mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-06 10:54:22 +08:00
In older vim versions, noinsert and noselect didn't work
Use longest instead of them.
This commit is contained in:
@@ -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>"
|
||||
|
||||
Reference in New Issue
Block a user