From 79566b5ddd40eab97c47e6495aa2107a62b7bdf0 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 26 Jul 2019 11:32:17 -0400 Subject: [PATCH] Don't override alt buffer on :Gwrite from index --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index bfbc981..2b22cf5 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -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