Merge pull request #501 from kashiro/fix/auto-selected-last-opt

check "noselect" and "noinsert" before <C-p>
This commit is contained in:
Dave Halter
2015-11-19 13:15:06 +01:00
2 changed files with 5 additions and 3 deletions

View File

@@ -48,6 +48,6 @@ Pedro Ferrari (@petobens)
Daniel Hahler (@blueyed) Daniel Hahler (@blueyed)
Dave Honneffer (@pearofducks) Dave Honneffer (@pearofducks)
Bagrat Aznauryan (@n9code) Bagrat Aznauryan (@n9code)
Tomoyuki Kashiro (@kashiro)
@something are github user names. @something are github user names.

View File

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