DWIM for % and # in URL argument

This commit is contained in:
Tim Pope
2022-06-13 07:12:29 -04:00
parent 020802475c
commit b42f95c0c2

View File

@@ -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