From 05000b1872bb49d3f03f3055581f22de0fc53e1b Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 9 May 2011 01:27:15 -0400 Subject: [PATCH] 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. --- plugin/fugitive.vim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 048089e..d8a8ba8 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -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)