mirror of
https://github.com/davidhalter/jedi-vim.git
synced 2025-12-08 03:24:47 +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.
|
" jedi-vim really needs, otherwise jedi-vim cannot start.
|
||||||
filetype plugin on
|
filetype plugin on
|
||||||
|
|
||||||
" Change completeopt, but only if it has Vim's default value.
|
" Change completeopt, but only if it was not set already.
|
||||||
let s:save_completeopt=&completeopt
|
redir => completeopt
|
||||||
set completeopt&
|
silent verb set completeopt?
|
||||||
let s:default_completeopt=&completeopt
|
redir END
|
||||||
let &completeopt=s:save_completeopt
|
if len(split(completeopt, '\n')) == 1
|
||||||
if s:default_completeopt == &completeopt
|
|
||||||
set completeopt=menuone,longest,preview
|
set completeopt=menuone,longest,preview
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user