From 8fd12ef14f85e74ac28eea877633978a89cac3b3 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Sun, 8 Jul 2012 01:04:01 -0400 Subject: [PATCH] Show diff from :Gstatus interally When pressing enter on a header in :Gstatus, use :Git! rather than :Git to show the diff. Closes #208. --- plugin/fugitive.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index cb4f2ae..e9059e8 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -696,9 +696,9 @@ function! s:StageDiff(diff) abort let line = getline('.') let filename = matchstr(line,'^#\t\%([[:alpha:] ]\+: *\)\=\zs.\{-\}\ze\%( (new commits)\)\=$') if filename ==# '' && section ==# '# Changes to be committed:' - return 'Git diff --cached' + return 'Git! diff --cached' elseif filename ==# '' - return 'Git diff' + return 'Git! diff' elseif line =~# '^#\trenamed:' && filename =~# ' -> ' let [old, new] = split(filename,' -> ') execute 'Gedit '.s:fnameescape(':0:'.new)