mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-14 06:13:51 -05:00
DWIM for % and # in URL argument
This commit is contained in:
@@ -1988,6 +1988,8 @@ function! s:Expand(rev, ...) abort
|
|||||||
else
|
else
|
||||||
let file = len(expand('%')) ? rev . ':%' : '%'
|
let file = len(expand('%')) ? rev . ':%' : '%'
|
||||||
endif
|
endif
|
||||||
|
elseif s:Slash(a:rev) =~# '^\a\a\+://'
|
||||||
|
let file = substitute(a:rev, '\\\@<!\%(#\a\|%\x\x\)', '\\&', 'g')
|
||||||
else
|
else
|
||||||
let file = a:rev
|
let file = a:rev
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user