Fix :Gblame on Windows
This commit is contained in:
parent
5f64bb35c9
commit
43290adc85
@ -1159,10 +1159,11 @@ function! s:Blame(bang,line1,line2,count,args) abort
|
|||||||
if a:count
|
if a:count
|
||||||
execute 'write !'.substitute(basecmd,' blame ',' blame -L '.a:line1.','.a:line2.' ','g')
|
execute 'write !'.substitute(basecmd,' blame ',' blame -L '.a:line1.','.a:line2.' ','g')
|
||||||
else
|
else
|
||||||
let temp = tempname().'.fugitiveblame'
|
let error = tempname()
|
||||||
silent! exe '%write !'.basecmd.' > '.temp.' 2> '.temp
|
let temp = error.'.fugitiveblame'
|
||||||
|
silent! exe '%write !'.basecmd.' > '.temp.' 2> '.error
|
||||||
if v:shell_error
|
if v:shell_error
|
||||||
call s:throw(join(readfile(temp),"\n"))
|
call s:throw(join(readfile(error),"\n"))
|
||||||
endif
|
endif
|
||||||
let bufnr = bufnr('')
|
let bufnr = bufnr('')
|
||||||
let restore = 'call setbufvar('.bufnr.',"&scrollbind",0)'
|
let restore = 'call setbufvar('.bufnr.',"&scrollbind",0)'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user