From 43290adc8566c8aa3a72adffa03ccba637af9af2 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 9 Mar 2010 08:43:57 -0500 Subject: [PATCH] Fix :Gblame on Windows --- plugin/fugitive.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 367d0ed..44ccc46 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -1159,10 +1159,11 @@ function! s:Blame(bang,line1,line2,count,args) abort if a:count execute 'write !'.substitute(basecmd,' blame ',' blame -L '.a:line1.','.a:line2.' ','g') else - let temp = tempname().'.fugitiveblame' - silent! exe '%write !'.basecmd.' > '.temp.' 2> '.temp + let error = tempname() + let temp = error.'.fugitiveblame' + silent! exe '%write !'.basecmd.' > '.temp.' 2> '.error if v:shell_error - call s:throw(join(readfile(temp),"\n")) + call s:throw(join(readfile(error),"\n")) endif let bufnr = bufnr('') let restore = 'call setbufvar('.bufnr.',"&scrollbind",0)'