Don't open :Gstatus on empty :Gcommit
This commit is contained in:
parent
5540d257ef
commit
73220820b5
@ -2081,6 +2081,7 @@ function! s:Commit(mods, args, ...) abort
|
|||||||
echo line
|
echo line
|
||||||
endfor
|
endfor
|
||||||
endif
|
endif
|
||||||
|
call fugitive#ReloadStatus()
|
||||||
return ''
|
return ''
|
||||||
else
|
else
|
||||||
let errors = readfile(errorfile)
|
let errors = readfile(errorfile)
|
||||||
@ -2108,7 +2109,8 @@ function! s:Commit(mods, args, ...) abort
|
|||||||
setlocal bufhidden=wipe filetype=gitcommit
|
setlocal bufhidden=wipe filetype=gitcommit
|
||||||
return '1'
|
return '1'
|
||||||
elseif error ==# '!'
|
elseif error ==# '!'
|
||||||
return 'Gstatus'
|
echo get(readfile(outfile), -1, '')
|
||||||
|
return ''
|
||||||
else
|
else
|
||||||
call s:throw(empty(error)?join(errors, ' '):error)
|
call s:throw(empty(error)?join(errors, ' '):error)
|
||||||
endif
|
endif
|
||||||
@ -2121,7 +2123,6 @@ function! s:Commit(mods, args, ...) abort
|
|||||||
endif
|
endif
|
||||||
call delete(outfile)
|
call delete(outfile)
|
||||||
call delete(errorfile)
|
call delete(errorfile)
|
||||||
call fugitive#ReloadStatus()
|
|
||||||
endtry
|
endtry
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user