Skip to content

Commit

Permalink
if completeopt = longest is not set, change the default behaviour of …
Browse files Browse the repository at this point in the history
…the popup menu, fixes #32
  • Loading branch information
davidhalter committed Dec 11, 2012
1 parent 1507fcc commit 42900bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion ftplugin/python/jedi.vim
Expand Up @@ -25,7 +25,11 @@ if g:jedi#auto_initialization
end

if g:jedi#popup_on_dot
inoremap <buffer> . .<C-R>=jedi#do_popup_on_dot() ? "\<C-X>\<C-O>" : ""<CR>
if stridx(&completeopt, 'longest') > -1
inoremap <buffer> . .<C-R>=jedi#do_popup_on_dot() ? "\<lt>C-X>\<lt>C-O>" : ""<CR>
else
inoremap <buffer> . .<C-R>=jedi#do_popup_on_dot() ? "\<lt>C-X>\<lt>C-O>\<lt>C-P>" : ""<CR>
end
end

if g:jedi#auto_close_doc
Expand Down
2 changes: 1 addition & 1 deletion jedi
Submodule jedi updated 3 files
+5 −0 jedi/api.py
+12 −0 jedi/mixin/builtins.py
+1 −1 setup.py

0 comments on commit 42900bb

Please sign in to comment.