diff --git a/autoload/sy/repo.vim b/autoload/sy/repo.vim index b0fdd88..912780b 100644 --- a/autoload/sy/repo.vim +++ b/autoload/sy/repo.vim @@ -36,6 +36,14 @@ function! s:callback_stdout_vim(_job_id, data) dict abort let self.stdoutbuf += [a:data] endfunction +" Function: s:callback_close {{{1 +function! s:callback_close(channel) dict abort + try + silent! call job_status(ch_getjob(a:channel)) + catch + endtry +endfunction + " Function: s:callback_exit {{{1 function! s:callback_exit(_job_id, exitval, ...) dict abort call sy#verbose('callback_exit()', self.vcs) @@ -83,11 +91,15 @@ function! sy#repo#get_diff_start(vcs, do_register) abort try execute chdir fnameescape(b:sy_info.dir) - let b:sy_job_id_{a:vcs} = job_start(cmd, { + let opts = { \ 'in_io': 'null', \ 'out_cb': function('s:callback_stdout_vim', options), \ 'exit_cb': function('s:callback_exit', options), - \ }) + \ } + if !has('patch-8.0.50') + let opts.close_cb = function('s:callback_close') + endif + let b:sy_job_id_{a:vcs} = job_start(cmd, opts) finally execute chdir fnameescape(cwd) endtry diff --git a/doc/signify.txt b/doc/signify.txt index c7f8f54..a1c8b45 100644 --- a/doc/signify.txt +++ b/doc/signify.txt @@ -567,7 +567,7 @@ The plugin is slow!~ Line highlighting without showing signs?~ The line highlighting relies on signs being placed. The sign column is being -shown automatically when there are placed signs. +shown automatically if there are placed signs. With a recent Vim, you can change that behaviour using 'signcolumn'.