From 0b4e32180bba3ba56adafc077bc083366b3409d4 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 5 Nov 2010 18:17:09 -0400 Subject: [PATCH] Fix restoration of :lcd after :Gblame The restore of :lcd was happening after the split, meaning it was taking effect in the wrong window. --- plugin/fugitive.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index fb25ce8..3f666b0 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -1218,6 +1218,10 @@ function! s:Blame(bang,line1,line2,count,args) abort else silent! execute '%write !'.basecmd.' > '.temp.' 2> '.error endif + if exists('l:dir') + execute cd.'`=dir`' + unlet dir + endif if v:shell_error call s:throw(join(readfile(error),"\n")) endif