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