mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-06 18:54:44 +08:00
auto_vim_configuration: improve check for changed completeopt setting
The user might want to use the default actually.
This commit is contained in:
committed by
Dave Halter
parent
0ee2ed0bc6
commit
6411de0cd1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user