Fix garbage during :Gcommit with alternate screen

When running Vim in a terminal with an alternate screen buffer, :Gcommit
trashes the screen in a way that requires a redraw to fix.  Circumvent
this by using system() rather than `silent !`.  Fixes #68.
This commit is contained in:
Tim Pope 2011-05-09 01:27:15 -04:00
parent f112f9b830
commit 05000b1872

View File

@ -728,11 +728,11 @@ function! s:Commit(args) abort
endif
let command .= s:repo().git_command('commit').' '.a:args
if &shell =~# 'csh'
silent execute '!('.command.' > '.outfile.') >& '.errorfile
call system('('.command.' > '.outfile.') >& '.errorfile)
elseif a:args =~# '\%(^\| \)--interactive\>'
execute '!'.command.' 2> '.errorfile
call system(command.' 2> '.errorfile)
else
silent execute '!'.command.' > '.outfile.' 2> '.errorfile
call system(command.' > '.outfile.' 2> '.errorfile)
endif
if !v:shell_error
if filereadable(outfile)