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.
This commit is contained in:
parent
fb2f2405e6
commit
ded8213bf6
@ -236,14 +236,15 @@ function! sy#repo#process_diff(path, diff) abort
|
|||||||
|
|
||||||
if old_count > new_count
|
if old_count > new_count
|
||||||
let modified += new_count
|
let modified += new_count
|
||||||
let deleted += (old_count - new_count)
|
let removed = (old_count - new_count)
|
||||||
|
let deleted += removed
|
||||||
|
|
||||||
let offset = 0
|
let offset = 0
|
||||||
while offset < (new_count - 1)
|
while offset < (new_count - 1)
|
||||||
call add(signs, { 'type': 'SignifyChange', 'lnum': new_line + offset, 'path': a:path })
|
call add(signs, { 'type': 'SignifyChange', 'lnum': new_line + offset, 'path': a:path })
|
||||||
let offset += 1
|
let offset += 1
|
||||||
endwhile
|
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:
|
" lines changed and added:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user