From d2fda2847f424c8fded6e26fe32429bf9a0be147 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Tue, 17 Jan 2017 19:45:03 +0100 Subject: [PATCH] Propagate the correct VCS --- autoload/sy/repo.vim | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/autoload/sy/repo.vim b/autoload/sy/repo.vim index 7f76eb7..f493cbf 100644 --- a/autoload/sy/repo.vim +++ b/autoload/sy/repo.vim @@ -34,7 +34,8 @@ endfunction " Function: s:callback_exit {{{1 function! s:callback_exit(_job_id, exitcode, _event) dict abort call sy#verbose('Running callback_exit().') - call s:get_diff_end(a:exitcode, join(self.stdoutbuf, "\n"), self.do_register) + call s:get_diff_end(a:exitcode, self.vcs, join(self.stdoutbuf, "\n"), + \ self.do_register) endfunction " Function: sy#get_diff_start {{{1 @@ -50,6 +51,7 @@ function! sy#repo#get_diff_start(vcs, do_register) abort try let s:job_id_git = jobstart(cmd, { \ 'stdoutbuf': [], + \ 'vcs': a:vcs, \ 'do_register': a:do_register, \ 'on_stdout': function('s:callback_stdout_nvim'), \ 'on_exit': function('s:callback_exit'), @@ -59,14 +61,14 @@ function! sy#repo#get_diff_start(vcs, do_register) abort endtry else let diff = s:run(g:signify_vcs_cmds[a:vcs], b:sy_info.path) - call s:get_diff_end(v:shell_error, diff, a:do_register) + call s:get_diff_end(v:shell_error, a:vcs, diff, a:do_register) endif endfunction " Function: s:get_diff_end {{{1 -function! s:get_diff_end(exitcode, diff, do_register) abort +function! s:get_diff_end(exitcode, type, diff, do_register) abort if !a:exitcode - let b:sy.type = 'git' + let b:sy.type = a:type endif if !a:do_register let b:sy.id_top = g:id_top