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\>' if args !~# '\%(^\| \)--cleanup\>'
let args = '--cleanup=strip '.args let args = '--cleanup=strip '.args
endif endif
let old_nr = bufnr('')
if bufname('%') == '' && line('$') == 1 && getline(1) == '' && !&mod if bufname('%') == '' && line('$') == 1 && getline(1) == '' && !&mod
edit `=msgfile` edit `=msgfile`
else else
keepalt split `=msgfile` keepalt split `=msgfile`
endif endif
if old_type ==# 'index' if old_type ==# 'index'
bdelete # execute 'bdelete '.old_nr
endif endif
let b:fugitive_commit_arguments = args let b:fugitive_commit_arguments = args
setlocal bufhidden=delete filetype=gitcommit setlocal bufhidden=delete filetype=gitcommit