Fix closing of status window in :Gcommit

This commit is contained in:
Tim Pope
2011-04-25 15:17:19 -04:00
parent 081832380c
commit 4a5f1df129

View File

@@ -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