mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 05:43:52 -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
|
||||
if a:rev =~# '^:[0-3]$'
|
||||
let file = a:rev . ':%'
|
||||
elseif a:rev =~# '^>[~^]\|^>@{\|^>$'
|
||||
let file = 'HEAD' . a:rev[1:-1] . ':%'
|
||||
elseif a:rev ==# '>'
|
||||
let file = '%'
|
||||
elseif a:rev =~# '^>[~^]'
|
||||
let file = '!' . a:rev[1:-1] . ':%'
|
||||
elseif a:rev =~# '^>[> ]\@!'
|
||||
let file = a:rev[1:-1] . ':%'
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user