Check if completion is allowed on character events
This commit is contained in:
parent
c1815a9b2d
commit
6f9366d150
@ -588,12 +588,20 @@ endfunction
|
|||||||
|
|
||||||
|
|
||||||
function! s:OnInsertChar()
|
function! s:OnInsertChar()
|
||||||
|
if !s:AllowedToCompleteInCurrentBuffer()
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
call timer_stop( s:pollers.completion.id )
|
call timer_stop( s:pollers.completion.id )
|
||||||
call s:CloseCompletionMenu()
|
call s:CloseCompletionMenu()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
function! s:OnDeleteChar( key )
|
function! s:OnDeleteChar( key )
|
||||||
|
if !s:AllowedToCompleteInCurrentBuffer()
|
||||||
|
return a:key
|
||||||
|
endif
|
||||||
|
|
||||||
call timer_stop( s:pollers.completion.id )
|
call timer_stop( s:pollers.completion.id )
|
||||||
if pumvisible()
|
if pumvisible()
|
||||||
return "\<C-y>" . a:key
|
return "\<C-y>" . a:key
|
||||||
|
Loading…
Reference in New Issue
Block a user