Skip to content

Commit

Permalink
auto_vim_configuration: improve check for changed completeopt setting
Browse files Browse the repository at this point in the history
The user might want to use the default actually.
  • Loading branch information
blueyed authored and davidhalter committed Jun 10, 2017
1 parent 0ee2ed0 commit 6411de0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions plugin/jedi.vim
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ if get(g:, 'jedi#auto_vim_configuration', 1)
" jedi-vim really needs, otherwise jedi-vim cannot start.
filetype plugin on

" Change completeopt, but only if it has Vim's default value.
let s:save_completeopt=&completeopt
set completeopt&
let s:default_completeopt=&completeopt
let &completeopt=s:save_completeopt
if s:default_completeopt == &completeopt
" Change completeopt, but only if it was not set already.
redir => completeopt
silent verb set completeopt?
redir END
if len(split(completeopt, '\n')) == 1
set completeopt=menuone,longest,preview
endif

Expand Down

0 comments on commit 6411de0

Please sign in to comment.