parent
1b0ddad697
commit
546a6bf219
@ -1500,14 +1500,14 @@ function! s:Diff(bang,...)
|
||||
try
|
||||
let spec = s:repo().translate(file)
|
||||
let commit = matchstr(spec,'\C[^:/]//\zs\x\+')
|
||||
let restore = s:diff_restore()
|
||||
let w:fugitive_diff_restore = restore
|
||||
if s:buffer().compare_age(commit) < 0
|
||||
execute 'rightbelow '.vert.'split '.s:fnameescape(spec)
|
||||
execute 'rightbelow '.vert.'diffsplit '.s:fnameescape(spec)
|
||||
else
|
||||
execute 'leftabove '.vert.'split '.s:fnameescape(spec)
|
||||
execute 'leftabove '.vert.'diffsplit '.s:fnameescape(spec)
|
||||
endif
|
||||
call s:diffthis()
|
||||
wincmd p
|
||||
call s:diffthis()
|
||||
let w:fugitive_diff_restore = restore
|
||||
return ''
|
||||
catch /^fugitive:/
|
||||
return 'echoerr v:errmsg'
|
||||
|
Loading…
Reference in New Issue
Block a user