mirror of
https://github.com/airblade/vim-gitgutter.git
synced 2025-11-09 03:53:47 -05:00
Vim: only invoke async out handler when job succeeded.
This makes the plugin use Vim the same was as Neovim in terms of invoking callback handlers.
This commit is contained in:
@@ -84,6 +84,17 @@ function! s:on_stderr_vim(channel, _data) dict abort
|
|||||||
endtry
|
endtry
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:on_exit_vim(_channel) dict abort
|
function! s:on_exit_vim(channel) dict abort
|
||||||
|
let job = ch_getjob(a:channel)
|
||||||
|
while 1
|
||||||
|
if job_status(job) == 'dead'
|
||||||
|
let exit_code = job_info(job).exitval
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
sleep 5m
|
||||||
|
endwhile
|
||||||
|
|
||||||
|
if !exit_code
|
||||||
call self.handler.out(self.buffer, join(self.stdoutbuffer, "\n"))
|
call self.handler.out(self.buffer, join(self.stdoutbuffer, "\n"))
|
||||||
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|||||||
Reference in New Issue
Block a user