Track correct window when blaming twice-open buffer

Resolves: https://github.com/tpope/vim-fugitive/issues/1992
This commit is contained in:
Tim Pope
2022-05-20 11:36:28 -04:00
parent 5b62c75238
commit 589e8b51c2

View File

@@ -6939,7 +6939,7 @@ function! s:BlameSubcommand(line1, count, range, bang, mods, options) abort
execute winbufnr(winnr).'bdelete'
endif
endfor
let restore_winnr = 'bufwinnr(' . bufnr . ')'
let restore_winnr = exists('*win_getid') ? win_getid() : 'bufwinnr(' . bufnr . ')'
if !&l:scrollbind
call add(restore, 'call setwinvar(' . restore_winnr . ',"&scrollbind",0)')
endif