Skip to content

Commit

Permalink
Fix garbage during :Gcommit with alternate screen
Browse files Browse the repository at this point in the history
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 tpope#68.
  • Loading branch information
tpope committed May 9, 2011
1 parent f112f9b commit 05000b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugin/fugitive.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 05000b1

Please sign in to comment.