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.
This commit is contained in:
Andy Stewart
2018-11-17 17:17:03 +00:00
parent da91d44889
commit 208b439585

View File

@@ -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