diff --git a/autoload/jedi.vim b/autoload/jedi.vim index 66442a9..5fac67d 100644 --- a/autoload/jedi.vim +++ b/autoload/jedi.vim @@ -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()