From 29d5f294a6d0a10b5577001d29186d816f905b92 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Wed, 14 Aug 2019 14:29:01 +0200 Subject: [PATCH] SignifyDiffPreview: fix deleted line logic References https://github.com/mhinz/vim-signify/issues/300 --- autoload/sy/repo.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/sy/repo.vim b/autoload/sy/repo.vim index d8d112c..c561e2d 100644 --- a/autoload/sy/repo.vim +++ b/autoload/sy/repo.vim @@ -324,14 +324,14 @@ endfunction function! s:is_cur_line_in_hunk(hunkline) abort let cur_line = line('.') - let [old_line, new_line, _old_count, new_count] = sy#sign#parse_hunk(a:hunkline) + let [_old_line, new_line, old_count, new_count] = sy#sign#parse_hunk(a:hunkline) if cur_line == 1 && new_line == 0 " deleted first line return 1 endif - if cur_line == new_line && new_line < old_line + if cur_line == new_line && new_count < old_count " deleted lines return 1 endif