From e169595314917c21ea6be8973a6b3f848442e418 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 12 Jul 2019 09:15:46 -0400 Subject: [PATCH] Fix finishing :Gcommit on :wqa This was added to compensate for the implicit autowrite we lost when switching from :! to system(), but it seems calling in the VimLeavePre/BufLeave event prevents the commit from happening on exit. I don't fully understand it but it's easy to prevent. Closes https://github.com/tpope/vim-fugitive/issues/1285 --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 554ae83..cfba5e6 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2983,7 +2983,7 @@ function! s:CommitCommand(line1, line2, range, count, bang, mods, reg, arg, args let exec_error = v:shell_error call delete(errorfile) else - if &autowrite + if &autowrite && !a:0 wall endif let [error_string, exec_error] = s:TempCmd(outfile, command)