Don't override alt buffer on :Gwrite from index

This commit is contained in:
Tim Pope 2019-07-26 11:32:17 -04:00
parent d90e912e46
commit 79566b5ddd

View File

@ -3827,7 +3827,7 @@ function! s:WriteCommand(line1, line2, range, count, bang, mods, reg, arg, args)
if treebufnr > 0 && treebufnr != bufnr('')
let temp = tempname()
silent execute '%write '.temp
silent execute 'keepalt %write '.temp
for tab in [mytab] + range(1,tabpagenr('$'))
for winnr in range(1,tabpagewinnr(tab,'$'))
if tabpagebuflist(tab)[winnr-1] == treebufnr