commit 6d9dd103c020cac9d293df40e685e545ef814f9a (tree)
parent 3b1da8b217159b5896180d54aedc26a3b7471084
Author: Tim Pope <code@tpope.net>
Date: Sat, 30 Nov 2019 17:13:16 -0500
Fix false positive matching filename in blame
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim
@@ -4815,7 +4815,7 @@ function! s:BlameCommitFileLnum(...) abort
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\+)\)')
- let path = matchstr(line, '^\^\=[?*]*\x* \+\%(\d\+ \+\d\+ \+\)\=\zs.\{-\}\ze\s\+\%(\%( \d\+ \)\@<!([^()]*\w \d\+)\|\d\+ \)')
+ let path = matchstr(line, '^\^\=[?*]*\x* \+\%(\d\+ \+\d\+ \+\)\=\zs.\{-\}\ze\s*\d\+ \%((\| *\d\+)\)')
if empty(path) && lnum
let path = get(state, 'blame_file', '')
endif