Check if completion is allowed on character events

This commit is contained in:
micbou 2018-04-02 22:16:47 +02:00
parent c1815a9b2d
commit 6f9366d150
No known key found for this signature in database
GPG Key ID: C7E8FD1F3BDA1E05

View File

@ -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 "\<C-y>" . a:key