diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index b3cd92d..35d41ae 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -1506,8 +1506,8 @@ function! s:BlameJump(suffix) abort if commit =~# '^0\+$' let commit = ':0' endif - let lnum = matchstr(getline('.'),'\d\+\ze\s\+[([:digit:]]') - let path = matchstr(getline('.'),'^\^\=\zs\x\+\s\+\zs.\{-\}\ze\s*\d\+ ') + let lnum = matchstr(getline('.'),' \zs\d\+\ze\s\+[([:digit:]]') + let path = matchstr(getline('.'),'^\^\=\x\+\s\+\zs.\{-\}\ze\s*\d\+ ') if path ==# '' let path = s:buffer(b:fugitive_blamed_bufnr).path() endif @@ -1519,6 +1519,7 @@ function! s:BlameJump(suffix) abort exe winnr.'wincmd w' endif execute s:Edit('edit', 0, commit.a:suffix.':'.path) + execute lnum if winnr > 0 exe bufnr.'bdelete' endif