Skip to content

Commit

Permalink
* fix completion menu popup that disappeared because of the usage of
Browse files Browse the repository at this point in the history
	vim.command
* closes issue jceb#48
  • Loading branch information
jceb committed Aug 9, 2011
1 parent 35a4e1a commit 46747da
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
8 changes: 8 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
vim-orgmode (0.3.0-0) unstable; urgency=low

* fix completion menu popup that disappeared because of the usage of
vim.command
* closes issue #48

-- Jan Christoph Ebersbach <[email protected]> Tue, 09 Aug 2011 08:25:03 +0200

vim-orgmode (0.2.1-25) unstable; urgency=low

* playing around with ftdetect vs. setfiletype
Expand Down
4 changes: 3 additions & 1 deletion doc/org.txt
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,9 @@ LINKS *org-links*
==============================================================================
CHANGELOG *org-changelog*

0.3.0-0
0.3.0-0, 2011-08-09
- fix completion menu popup that disappeared because of the usage of vim.command
(closes issue #48)
- implement interactive todo state selection (closes issue #5)
- add orgmode group to au commands in TagProperties plugin (closes issue #53)
- allow demotion of first level headings (closes issue #27)
Expand Down
7 changes: 5 additions & 2 deletions ftplugin/orgmode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,11 @@ def fold_text():
str_heading = str_heading.replace(u'\t', u' ' * (ts - spaces), 1)
str_heading = str_heading.replace(u'\t', u' ' * ts)

vim.command((u'let b:foldtext = "%s... "' % \
(str_heading.replace(u'\\', u'\\\\').replace(u'"', u'\\"'), )).encode('utf-8'))
# Workaround for vim.command seems to break the completion menu
vim.eval((u'SetOrgFoldtext("%s")' \
% (str_heading.replace(u'\\', u'\\\\').replace(u'"', u'\\"'), )).encode(u'utf-8'))
#vim.command((u'let b:foldtext = "%s... "' % \
# (str_heading.replace(u'\\', u'\\\\').replace(u'"', u'\\"'), )).encode('utf-8'))

def fold_orgmode():
u""" Set the fold expression/value for the current line in the variable b:fold_expr
Expand Down
4 changes: 4 additions & 0 deletions indent/org.vim
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ EOF
endif
endfunction

function! SetOrgFoldtext(text)
let b:foldtext = a:text
endfunction

function! GetOrgFoldtext()
python << EOF
from orgmode import fold_text
Expand Down

0 comments on commit 46747da

Please sign in to comment.