mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 13:53:51 -05:00
Fix closing of status window in :Gcommit
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user