Auto merge of #2703 - micbou:stop-completion-polling-on-insert-leave, r=bstaletic

[READY] Stop completion polling when leaving insert mode

Completing outside insert mode is not going to work.

<!-- 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/2703)
<!-- Reviewable:end -->
This commit is contained in:
zzbot 2017-07-05 01:13:08 -07:00 committed by GitHub
commit bc6ff361af

View File

@ -615,8 +615,10 @@ function! s:OnInsertLeave()
return return
endif endif
call timer_stop( s:pollers.completion.id )
let s:force_semantic = 0 let s:force_semantic = 0
let s:completion = s:default_completion let s:completion = s:default_completion
call s:OnFileReadyToParse() call s:OnFileReadyToParse()
exec s:python_command "ycm_state.OnInsertLeave()" exec s:python_command "ycm_state.OnInsertLeave()"
if g:ycm_autoclose_preview_window_after_completion || if g:ycm_autoclose_preview_window_after_completion ||