From 73220820b5eb399d29067f114888da0d8e1e08da Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Wed, 19 Dec 2018 17:08:38 -0500 Subject: [PATCH] Don't open :Gstatus on empty :Gcommit --- autoload/fugitive.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index bbc23f7..b326541 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2081,6 +2081,7 @@ function! s:Commit(mods, args, ...) abort echo line endfor endif + call fugitive#ReloadStatus() return '' else let errors = readfile(errorfile) @@ -2108,7 +2109,8 @@ function! s:Commit(mods, args, ...) abort setlocal bufhidden=wipe filetype=gitcommit return '1' elseif error ==# '!' - return 'Gstatus' + echo get(readfile(outfile), -1, '') + return '' else call s:throw(empty(error)?join(errors, ' '):error) endif @@ -2121,7 +2123,6 @@ function! s:Commit(mods, args, ...) abort endif call delete(outfile) call delete(errorfile) - call fugitive#ReloadStatus() endtry endfunction