mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-12 21:33:53 -05:00
Add >/ and >:/ as work-tree version expansions
Not sure I want to waste the easy to type ">" on the work tree version, so adding some alternatives.
This commit is contained in:
@@ -1868,7 +1868,7 @@ endfunction
|
||||
function! s:Expand(rev, ...) abort
|
||||
if a:rev =~# '^>\=:[0-3]$'
|
||||
let file = len(expand('%')) ? a:rev[-2:-1] . ':%' : '%'
|
||||
elseif a:rev ==# '>'
|
||||
elseif a:rev =~# '^>\%(:\=/\)\=$'
|
||||
let file = '%'
|
||||
elseif a:rev ==# '>:'
|
||||
let file = empty(s:DirCommitFile(@%)[0]) ? ':0:%' : '%'
|
||||
|
||||
Reference in New Issue
Block a user