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