Auto merge of #2979 - micbou:allowed-on-char-events, r=puremourning
[READY] Check if completion is allowed on character events We should check if completion is allowed when a character is inserted or deleted like we do with the other events. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/2979) <!-- Reviewable:end -->
This commit is contained in:
commit
3bcc45ead1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user