From 208b439585f2dc54a2875c79a5985ef81b60316e Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Sat, 17 Nov 2018 17:17:03 +0000 Subject: [PATCH] Vim: remove unreliable way of preventing close callback for unsuccessful job. Until this commit the err callback closed the channel to prevent the close callback from being invoked, because the close callback invoked the out handler (which we don't want when the job was unsuccessful). This mostly worked but if closing the channel took too long, which it seemed it could when dealing with large files, the close callback could be called in the meantime. This commit removes the unreliable code. The parent commit ensured that the close callback only calls the out handler when the job succeeded, so we no longer need to try to prevent the close callback from being called. --- autoload/gitgutter/async.vim | 5 ----- 1 file changed, 5 deletions(-) diff --git a/autoload/gitgutter/async.vim b/autoload/gitgutter/async.vim index ea11c36..40f2ad2 100644 --- a/autoload/gitgutter/async.vim +++ b/autoload/gitgutter/async.vim @@ -77,11 +77,6 @@ endfunction function! s:on_stderr_vim(channel, _data) dict abort call self.handler.err(self.buffer) - try - call ch_close(a:channel) " so close_cb and its 'out' handler are not triggered - catch /E906/ - " noop - endtry endfunction function! s:on_exit_vim(channel) dict abort