check "noselect" and "noinsert" before <C-p>

to prevent from selecting last option check "noselect" and "noinsert" before <C-p>
  @see https://github.com/Shougo/neocomplete.vim/blob/master/doc/neocomplete.txt#L1817-L1826
This commit is contained in:
Tomoyuki Kashiro
2015-11-19 18:33:44 +09:00
parent 0c2831d9a6
commit 217e56d9bd
2 changed files with 5 additions and 3 deletions

View File

@@ -491,8 +491,10 @@ function! jedi#complete_opened(is_popup_on_dot)
return "\<Down>"
endif
if a:is_popup_on_dot
" Prevent completion of the first entry with dot completion.
return "\<C-p>"
if &completeopt !~ '\(noinsert\|noselect\)'
" Prevent completion of the first entry with dot completion.
return "\<C-p>"
endif
endif
endif
return ""