diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 58511a7..4dcd1d9 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -4635,6 +4635,8 @@ function! s:BlameCommand(line1, line2, range, count, bang, mods, reg, arg, args) let edit = s:Mods(a:mods) . get(['edit', 'split', 'pedit'], a:count - (a:line1 ? a:line1 : 1), 'split') return s:BlameCommit(edit, get(readfile(temp), 0, ''), bufnr('')) else + let temp = s:Resolve(temp) + let s:temp_files[s:cpath(temp)] = {'dir': s:Dir(), 'filetype': 'fugitiveblame', 'args': cmd} for winnr in range(winnr('$'),1,-1) call setwinvar(winnr, '&scrollbind', 0) if exists('+cursorbind') @@ -4645,6 +4647,7 @@ function! s:BlameCommand(line1, line2, range, count, bang, mods, reg, arg, args) endif endfor let bufnr = bufnr('') + let s:temp_files[s:cpath(temp)].bufnr = bufnr let restore = 'call setwinvar(bufwinnr('.bufnr.'),"&scrollbind",0)' if exists('+cursorbind') let restore .= '|call setwinvar(bufwinnr('.bufnr.'),"&cursorbind",0)' @@ -4661,8 +4664,6 @@ function! s:BlameCommand(line1, line2, range, count, bang, mods, reg, arg, args) endif let top = line('w0') + &scrolloff let current = line('.') - let temp = s:Resolve(temp) - let s:temp_files[s:cpath(temp)] = { 'dir': s:Dir(), 'filetype': 'fugitiveblame', 'args': cmd, 'bufnr': bufnr } exe 'keepalt' (a:bang ? 'split' : 'leftabove vsplit') s:fnameescape(temp) let b:fugitive_blamed_bufnr = bufnr let b:fugitive_type = 'blame' @@ -4674,7 +4675,7 @@ function! s:BlameCommand(line1, line2, range, count, bang, mods, reg, arg, args) if exists('+cursorbind') setlocal cursorbind endif - setlocal nomodified nomodifiable nonumber scrollbind nowrap foldcolumn=0 nofoldenable winfixwidth filetype=fugitiveblame buftype=nowrite + setlocal nonumber scrollbind nowrap foldcolumn=0 nofoldenable winfixwidth if exists('+concealcursor') setlocal concealcursor=nc conceallevel=2 endif