From 217e56d9bd69f054ea8c0f94296e312e72b6066a Mon Sep 17 00:00:00 2001 From: Tomoyuki Kashiro Date: Thu, 19 Nov 2015 18:33:44 +0900 Subject: [PATCH] check "noselect" and "noinsert" before to prevent from selecting last option check "noselect" and "noinsert" before @see https://github.com/Shougo/neocomplete.vim/blob/master/doc/neocomplete.txt#L1817-L1826 --- AUTHORS.txt | 2 +- autoload/jedi.vim | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/AUTHORS.txt b/AUTHORS.txt index 517fcb5..6e77b5c 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -48,6 +48,6 @@ Pedro Ferrari (@petobens) Daniel Hahler (@blueyed) Dave Honneffer (@pearofducks) Bagrat Aznauryan (@n9code) - +Tomoyuki Kashiro (@kashiro) @something are github user names. diff --git a/autoload/jedi.vim b/autoload/jedi.vim index fad7ca4..49e9d0a 100644 --- a/autoload/jedi.vim +++ b/autoload/jedi.vim @@ -491,8 +491,10 @@ function! jedi#complete_opened(is_popup_on_dot) return "\" endif if a:is_popup_on_dot - " Prevent completion of the first entry with dot completion. - return "\" + if &completeopt !~ '\(noinsert\|noselect\)' + " Prevent completion of the first entry with dot completion. + return "\" + endif endif endif return ""