From 80aa8a9aea72f2054fb2ad8582461f60b0db9757 Mon Sep 17 00:00:00 2001 From: Maksim Odnoletkov Date: Tue, 1 Oct 2019 00:28:35 +0100 Subject: [PATCH] Fix reverse blame jump for the boundary edge case When the line is reverse-blamed to an *immediate* child of the current commit it is shown as `^commit` in the reverse blame output. In this case we still need to open the child of this commit since it will be a commit removing the line. Closes https://github.com/tpope/vim-fugitive/issues/1359 --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 7dfb917..69439c2 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -4712,7 +4712,7 @@ function! s:BlameCommitFileLnum(...) abort let commit = matchstr(line, '^\^\=\zs\x\+') if commit =~# '^0\+$' let commit = '' - elseif line !~# '^\^' && has_key(state, 'blame_reverse_end') + elseif has_key(state, 'blame_reverse_end') let commit = get(s:LinesError('rev-list', '--ancestry-path', '--reverse', commit . '..' . state.blame_reverse_end)[0], 0, '') endif let lnum = +matchstr(line, ' \zs\d\+\ze \%((\| *\d\+)\)')