From 6f9366d150a3dc1f5671ed93bbb7cddc580281e0 Mon Sep 17 00:00:00 2001 From: micbou Date: Mon, 2 Apr 2018 22:16:47 +0200 Subject: [PATCH] Check if completion is allowed on character events --- autoload/youcompleteme.vim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/autoload/youcompleteme.vim b/autoload/youcompleteme.vim index 5df66044..a1f10ae6 100644 --- a/autoload/youcompleteme.vim +++ b/autoload/youcompleteme.vim @@ -588,12 +588,20 @@ endfunction function! s:OnInsertChar() + if !s:AllowedToCompleteInCurrentBuffer() + return + endif + call timer_stop( s:pollers.completion.id ) call s:CloseCompletionMenu() endfunction function! s:OnDeleteChar( key ) + if !s:AllowedToCompleteInCurrentBuffer() + return a:key + endif + call timer_stop( s:pollers.completion.id ) if pumvisible() return "\" . a:key