From 6411de0cd1d2a2959f5a0bf977b3f8ecea2209d0 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 4 Jun 2017 00:28:08 +0200 Subject: [PATCH] auto_vim_configuration: improve check for changed completeopt setting The user might want to use the default actually. --- plugin/jedi.vim | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/plugin/jedi.vim b/plugin/jedi.vim index e2240145..6fe1bccc 100644 --- a/plugin/jedi.vim +++ b/plugin/jedi.vim @@ -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