Fix jedi#complete_opened for completeopt with "longest"

jedi#complete_opened: move <C-p> for is_popup_on_dot below "longest"
handling.

Fixes #399.
This commit is contained in:
Daniel Hahler
2015-05-01 04:41:33 +02:00
parent 03805f87f5
commit 2f06d90f95

View File

@@ -407,15 +407,15 @@ endfunction
function! jedi#complete_opened(is_popup_on_dot)
if pumvisible()
if a:is_popup_on_dot
" Prevent completion of the first entry with dot completion.
return "\<C-p>"
endif
" Only go down if it is visible, user-enabled and the longest
" option is set.
if g:jedi#popup_select_first && stridx(&completeopt, 'longest') > -1
return "\<Down>"
endif
if a:is_popup_on_dot
" Prevent completion of the first entry with dot completion.
return "\<C-p>"
endif
endif
return ""
endfunction