From 67c39a33308e88a4508dee9b42dfbc6df0f3972e Mon Sep 17 00:00:00 2001 From: Chih-Hsuan Yen Date: Fri, 11 Jan 2019 04:37:44 +0800 Subject: [PATCH] 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! --- autoload/youcompleteme.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/autoload/youcompleteme.vim b/autoload/youcompleteme.vim index 7493a4fe..142ef895 100644 --- a/autoload/youcompleteme.vim +++ b/autoload/youcompleteme.vim @@ -509,6 +509,11 @@ endfunction 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()" endfunction