From 4a5f1df1291f6a6e1cce30dc1224d09cda439143 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 25 Apr 2011 15:17:19 -0400 Subject: [PATCH] Fix closing of status window in :Gcommit --- plugin/fugitive.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 4fe076d..80bd1c7 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -752,13 +752,14 @@ function! s:Commit(args) abort if args !~# '\%(^\| \)--cleanup\>' let args = '--cleanup=strip '.args endif + let old_nr = bufnr('') if bufname('%') == '' && line('$') == 1 && getline(1) == '' && !&mod edit `=msgfile` else keepalt split `=msgfile` endif if old_type ==# 'index' - bdelete # + execute 'bdelete '.old_nr endif let b:fugitive_commit_arguments = args setlocal bufhidden=delete filetype=gitcommit