mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 06:13:51 -05:00
Tweak :Gedit > semantics
Treat ~ and ^ suffixes as relative to current commit, not HEAD, and use a bare > to get to the work tree version.
This commit is contained in:
@@ -1038,8 +1038,10 @@ endfunction
|
|||||||
function! s:Expand(rev, ...) abort
|
function! s:Expand(rev, ...) abort
|
||||||
if a:rev =~# '^:[0-3]$'
|
if a:rev =~# '^:[0-3]$'
|
||||||
let file = a:rev . ':%'
|
let file = a:rev . ':%'
|
||||||
elseif a:rev =~# '^>[~^]\|^>@{\|^>$'
|
elseif a:rev ==# '>'
|
||||||
let file = 'HEAD' . a:rev[1:-1] . ':%'
|
let file = '%'
|
||||||
|
elseif a:rev =~# '^>[~^]'
|
||||||
|
let file = '!' . a:rev[1:-1] . ':%'
|
||||||
elseif a:rev =~# '^>[> ]\@!'
|
elseif a:rev =~# '^>[> ]\@!'
|
||||||
let file = a:rev[1:-1] . ':%'
|
let file = a:rev[1:-1] . ':%'
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user