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\>'
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user