mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2026-10-04 19:29:07 +08:00
In older vim versions, noinsert and noselect didn't work
Use longest instead of them.
This commit is contained in:
1 parent
65190a1856
commit
8b7c4cbad5
1 file changed
+10
-3
+10
-3
@@ -569,10 +569,17 @@ function! jedi#complete_string(autocomplete) abort
|
||||
set completeopt+=menuone
|
||||
set completeopt-=menu
|
||||
if &completeopt !~# 'noinsert\|noselect'
|
||||
if g:jedi#popup_select_first
|
||||
set completeopt+=noinsert
|
||||
" 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+=noselect
|
||||
set completeopt+=longest
|
||||
endif
|
||||
endif
|
||||
elseif pumvisible()
|
||||
|
||||
Reference in new issue
Block a user