forked from VimPlug/jedi-vim
In older vim versions, noinsert and noselect didn't work
Use longest instead of them.
This commit is contained in:
@@ -569,10 +569,17 @@ function! jedi#complete_string(autocomplete) abort
|
|||||||
set completeopt+=menuone
|
set completeopt+=menuone
|
||||||
set completeopt-=menu
|
set completeopt-=menu
|
||||||
if &completeopt !~# 'noinsert\|noselect'
|
if &completeopt !~# 'noinsert\|noselect'
|
||||||
if g:jedi#popup_select_first
|
" Patch 775 introduced noinsert and noselect, previously these
|
||||||
set completeopt+=noinsert
|
" 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
|
else
|
||||||
set completeopt+=noselect
|
set completeopt+=longest
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
elseif pumvisible()
|
elseif pumvisible()
|
||||||
|
|||||||
Reference in New Issue
Block a user