diff options
author | w0rp <devw0rp@gmail.com> | 2017-07-21 14:55:26 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2017-07-21 14:55:32 +0100 |
commit | ee6dabcc4e2f64c7a035a2e7da3bc13285013d88 (patch) | |
tree | bf2c33323ce08644148a8332f5ebe736bea9da72 | |
parent | af6830a72251a0800036f6bd99c9e9443dd2761c (diff) | |
download | ale-ee6dabcc4e2f64c7a035a2e7da3bc13285013d88.zip |
Don't mess with compleopt for each completion, as it doesn't work
-rw-r--r-- | autoload/ale/completion.vim | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/autoload/ale/completion.vim b/autoload/ale/completion.vim index 0ad0f6a5..17389a3f 100644 --- a/autoload/ale/completion.vim +++ b/autoload/ale/completion.vim @@ -102,21 +102,15 @@ function! ale#completion#Show(response, completion_parser) abort " Remember the old omnifunc value, if there is one. " If we don't store an old one, we'll just never reset the option. " This will stop some random exceptions from appearing. - if !exists('b:ale_old_omnifunc') && !empty(&omnifunc) - let b:ale_old_omnifunc = &omnifunc - endif - - " Remember the old completion options, if they are set. - if !exists('b:ale_old_completeopt') && !empty(&completeopt) - let b:ale_old_completeopt = &completeopt + if !exists('b:ale_old_omnifunc') && !empty(&l:omnifunc) + let b:ale_old_omnifunc = &l:omnifunc endif " Set the list in the buffer, temporarily replace omnifunc with our " function, and then start omni-completion. let b:ale_completion_response = a:response let b:ale_completion_parser = a:completion_parser - let &omnifunc = 'ale#completion#OmniFunc' - let &completeopt = 'menu,noinsert,noselect' + let &l:omnifunc = 'ale#completion#OmniFunc' call feedkeys("\<C-x>\<C-o>", 'n') endfunction @@ -306,14 +300,9 @@ function! ale#completion#Done() abort " Reset settings when completion is done. if exists('b:ale_old_omnifunc') - let &omnifunc = b:ale_old_omnifunc + let &l:omnifunc = b:ale_old_omnifunc unlet b:ale_old_omnifunc endif - - if exists('b:ale_old_completeopt') - let &completeopt = b:ale_old_completeopt - unlet b:ale_old_completeopt - endif endfunction function! s:Setup(enabled) abort |