In older vim versions, noinsert and noselect didn't work

Use longest instead of them.
This commit is contained in:
Dave Halter
2017-10-12 20:22:48 +02:00
parent 65190a1856
commit 8b7c4cbad5

View File

@@ -569,11 +569,18 @@ function! jedi#complete_string(autocomplete) abort
set completeopt+=menuone
set completeopt-=menu
if &completeopt !~# 'noinsert\|noselect'
" Patch 775 introduced noinsert and noselect, previously these
" options didn't exist. Setting them in earlier versions results in
" errors (E474).
if has("patch-7.4-775")
if g:jedi#popup_select_first
set completeopt+=noinsert
else
set completeopt+=noselect
endif
else
set completeopt+=longest
endif
endif
elseif pumvisible()
return "\<C-n>"