From ded8213bf604a273738dc8f1d2215ccca4b761f2 Mon Sep 17 00:00:00 2001 From: James McCoy Date: Fri, 27 Sep 2013 00:13:28 -0400 Subject: [PATCH] Calculate correct ChangeDelete sign to use Using deleted was causing the sign to reflect all the deleted lines so far in the buffer instead of the deleted line count for this hunk. --- autoload/sy/repo.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autoload/sy/repo.vim b/autoload/sy/repo.vim index 25419c1..a6b34fb 100644 --- a/autoload/sy/repo.vim +++ b/autoload/sy/repo.vim @@ -236,14 +236,15 @@ function! sy#repo#process_diff(path, diff) abort if old_count > new_count let modified += new_count - let deleted += (old_count - new_count) + let removed = (old_count - new_count) + let deleted += removed let offset = 0 while offset < (new_count - 1) call add(signs, { 'type': 'SignifyChange', 'lnum': new_line + offset, 'path': a:path }) let offset += 1 endwhile - call add(signs, { 'type': (deleted > 9) ? 'SignifyChangeDeleteMore' : 'SignifyChangeDelete'. deleted, 'lnum': new_line, 'path': a:path }) + call add(signs, { 'type': (removed > 9) ? 'SignifyChangeDeleteMore' : 'SignifyChangeDelete'. deleted, 'lnum': new_line, 'path': a:path }) " lines changed and added: