-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[bug] '<,'>GBrowse
attaches %5C
in URL before the #
character
#2354
Comments
A possible fix would be to use |
fortunately, most of the escaping in diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim
index 17fd04d..9dba547 100644
--- a/autoload/fugitive.vim
+++ b/autoload/fugitive.vim
@@ -7437,7 +7437,9 @@ function! s:BrowserOpen(url, mods, echo_copy) abort
if !exists('g:loaded_netrw')
runtime! autoload/netrw.vim
endif
- if exists('*netrw#BrowseX')
+ if has('nvim-0.11') && exists('*netrw#Open')
+ return 'echo '.string(url).'|' . mods . 'call netrw#Open('.string(url).')'
+ elseif exists('*netrw#BrowseX')
return 'echo '.string(url).'|' . mods . 'call netrw#BrowseX('.string(url).', 0)'
elseif exists('*netrw#NetrwBrowseX')
return 'echo '.string(url).'|' . mods . 'call netrw#NetrwBrowseX('.string(url).', 0)' |
The same happens with vim v9.1.906 on Fedora 41. |
Im also affected by this as I have a custom browse handler with Would love to get the PR merged |
after this commit, and because of this line the
#
character used to point to a specific line/range of lines is escaped, causing the opened URL to look like this:<path_to_file>%5C#<lines>
which results in 404 Not Found error. Confirmed this by removing theescape()
call from the mentioned line and re-building neovimThe text was updated successfully, but these errors were encountered: