diff options
author | w0rp <devw0rp@gmail.com> | 2020-08-29 17:27:53 +0100 |
---|---|---|
committer | w0rp <devw0rp@gmail.com> | 2020-08-29 17:27:53 +0100 |
commit | 6e2e51b154d526c1ab0b506bb2110b45421b7a06 (patch) | |
tree | c4a892e9ae990ee218426b053dfa36a8dcd8d9c7 /autoload | |
parent | 6888ca46a7ccff0fccf3fde13330cce644470434 (diff) | |
download | ale-6e2e51b154d526c1ab0b506bb2110b45421b7a06.zip |
Fix #2971 - Disable automatic completion while 'paste' is active
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/completion.vim | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/autoload/ale/completion.vim b/autoload/ale/completion.vim index f6a0c350..5035bbf0 100644 --- a/autoload/ale/completion.vim +++ b/autoload/ale/completion.vim @@ -324,6 +324,12 @@ function! ale#completion#AutomaticOmniFunc(findstart, base) abort endif endfunction +function! s:OpenCompletionMenu(...) abort + if !&l:paste + call ale#util#FeedKeys("\<Plug>(ale_show_completion_menu)") + endif +endfunction + function! ale#completion#Show(result) abort if ale#util#Mode() isnot# 'i' return @@ -344,10 +350,7 @@ function! ale#completion#Show(result) abort let l:source = get(get(b:, 'ale_completion_info', {}), 'source', '') if l:source is# 'ale-automatic' || l:source is# 'ale-manual' - call timer_start( - \ 0, - \ {-> ale#util#FeedKeys("\<Plug>(ale_show_completion_menu)")} - \) + call timer_start(0, function('s:OpenCompletionMenu')) endif if l:source is# 'ale-callback' |