Don't expand # in :GBrowse http://example.com/#anchor

This commit is contained in:
Tim Pope
2021-03-18 17:03:39 -04:00
parent 91089715f4
commit 0858688120

View File

@@ -3611,6 +3611,7 @@ endfunction
function! s:StageDelete(lnum1, lnum2, count) abort
let restore = []
let err = ''
let did_conflict_err = 0
try
@@ -5734,6 +5735,8 @@ function! fugitive#BrowseCommand(line1, count, range, bang, mods, arg, args) abo
endif
if rev =~# '^:\=$'
let expanded = s:Relative()
elseif rev =~? '^\a\a\+:[\/][\/]' && rev !~? '^fugitive:'
let expanded = s:Expand(substitute(rev, '\\\@<!#\|\\\@<!%\ze\w', '\\&', 'g'))
else
let expanded = s:Expand(rev)
endif