mirror of
https://github.com/tpope/vim-fugitive.git
synced 2026-10-09 14:55:57 +08:00
DWIM for % and # in URL argument
This commit is contained in:
1 parent
020802475c
commit
b42f95c0c2
1 file changed
+2
@@ -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