3 Commits
v1.2 ... copied

Author SHA1 Message Date
Tim Pope
ea7b1ab602 Support "copied:" lines in :Gstatus 2011-05-09 11:37:55 -04:00
Tim Pope
aaf5b34366 Fix garbling on :Gcommit when nothing is staged
Fixes #68.
2011-05-09 08:37:24 -04:00
Tim Pope
05000b1872 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.
2011-05-09 01:27:15 -04:00

View File

@@ -574,7 +574,7 @@ function! s:StageDiff(...) abort
return 'Git diff --cached'
elseif filename ==# ''
return 'Git diff'
elseif line =~# '^#\trenamed:' && filename =~ ' -> '
elseif line =~# '^#\t\%(renamed\|copied\):' && filename =~ ' -> '
let [old, new] = split(filename,' -> ')
execute 'Gedit '.s:fnameescape(':0:'.new)
return cmd.' HEAD:'.s:fnameescape(old)
@@ -632,7 +632,7 @@ function! s:StageToggle(lnum1,lnum2) abort
let cmd = ['mv','--'] + reverse(split(filename,' -> '))
let filename = cmd[-1]
elseif section =~? ' to be '
let cmd = ['reset','-q','--',filename]
let cmd = ['reset','-q','--',split(filename,' -> ')[-1]]
elseif line =~# '^#\tdeleted:'
let cmd = ['rm','--',filename]
else
@@ -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)
@@ -1621,7 +1621,7 @@ function! s:ReplaceCmd(cmd,...) abort
endif
endif
set noautowrite
silent exe '!'.escape(prefix.a:cmd,'%#').' > '.tmp
call system(prefix.a:cmd.' > '.tmp)
finally
let &autowrite = aw
if exists('old_index')