Workaround "Invalid channel" errors when NeoVim exits immediately after started

The idea is from https://github.com/neovim/neovim/issues/6840#issuecomment-309960751

Thanks micbou!
This commit is contained in:
Chih-Hsuan Yen 2019-01-11 04:37:44 +08:00
parent ccc06c2c42
commit 67c39a3330
No known key found for this signature in database
GPG Key ID: F98EF2A7B0A098AE

View File

@ -509,6 +509,11 @@ endfunction
function! s:OnVimLeave() function! s:OnVimLeave()
" Workaround a NeoVim issue - not shutting down timers correctly
" https://github.com/neovim/neovim/issues/6840
for poller in values( s:pollers )
call timer_stop( poller.id )
endfor
exec s:python_command "ycm_state.OnVimLeave()" exec s:python_command "ycm_state.OnVimLeave()"
endfunction endfunction