diff --git a/autoload/sy.vim b/autoload/sy.vim index cee241b..5ef9804 100644 --- a/autoload/sy.vim +++ b/autoload/sy.vim @@ -66,7 +66,6 @@ function! sy#start() abort endif endif else - let b:sy.updated_by = '' for vcs in b:sy.vcs let job_id = get(b:, 'sy_job_id_'. vcs) if type(job_id) != type(0) || job_id > 0 diff --git a/autoload/sy/repo.vim b/autoload/sy/repo.vim index ad6e04e..52ca812 100644 --- a/autoload/sy/repo.vim +++ b/autoload/sy/repo.vim @@ -51,7 +51,7 @@ function! s:job_exit(bufnr, vcs, exitval, diff) abort if empty(sy) call sy#verbose(printf('No b:sy found for %s', bufname(a:bufnr)), a:vcs) return - elseif !empty(sy.updated_by) + elseif !empty(sy.updated_by) && sy.updated_by != a:vcs call sy#verbose(printf('Signs already got updated by %s.', sy.updated_by), a:vcs) return elseif empty(sy.vcs) && sy.active diff --git a/autoload/sy/sign.vim b/autoload/sy/sign.vim index 5b2a648..b792a62 100644 --- a/autoload/sy/sign.vim +++ b/autoload/sy/sign.vim @@ -194,6 +194,11 @@ function! sy#sign#process_diff(sy, vcs, diff) abort call feedkeys("\", 'n') endif + if empty(a:sy.updated_by) && empty(a:sy.hunks) + call sy#verbose('Successful exit value, but no diff. Keep VCS for time being.', a:vcs) + return + endif + call sy#verbose('Signs updated.', a:vcs) let a:sy.updated_by = a:vcs if len(a:sy.vcs) > 1