Fix :Gdiff HEAD when in a blob

This commit is contained in:
Tim Pope 2009-10-15 18:33:08 -04:00
parent a6439f6aa0
commit 7da464557b

View File

@ -677,7 +677,7 @@ function! s:Diff(...) abort
let file = s:buffer().expand(a:1)
endif
if file !~ ':' && file !~ '^/'
let file = file.s:buffer().path(':0:')
let file = file.s:buffer().path(':')
endif
else
let file = s:buffer().path(s:buffer().commit() == '' ? ':0:' : '/')