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:
parent
f112f9b830
commit
05000b1872
@ -728,11 +728,11 @@ function! s:Commit(args) abort
|
|||||||
endif
|
endif
|
||||||
let command .= s:repo().git_command('commit').' '.a:args
|
let command .= s:repo().git_command('commit').' '.a:args
|
||||||
if &shell =~# 'csh'
|
if &shell =~# 'csh'
|
||||||
silent execute '!('.command.' > '.outfile.') >& '.errorfile
|
call system('('.command.' > '.outfile.') >& '.errorfile)
|
||||||
elseif a:args =~# '\%(^\| \)--interactive\>'
|
elseif a:args =~# '\%(^\| \)--interactive\>'
|
||||||
execute '!'.command.' 2> '.errorfile
|
call system(command.' 2> '.errorfile)
|
||||||
else
|
else
|
||||||
silent execute '!'.command.' > '.outfile.' 2> '.errorfile
|
call system(command.' > '.outfile.' 2> '.errorfile)
|
||||||
endif
|
endif
|
||||||
if !v:shell_error
|
if !v:shell_error
|
||||||
if filereadable(outfile)
|
if filereadable(outfile)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user