From d3e2b58dec75fc6012fecc82ce0d33a45ed0560e Mon Sep 17 00:00:00 2001 From: Josh Priddle Date: Fri, 11 Jul 2025 14:49:52 -0400 Subject: [PATCH] Fix GBrowse for newer Netrw versions In vim/vim@ef92555 the arity of `netrw#BrowseX` changed from 2 to 1. There is now a `netrw#os#Open()` function that can be used to open URLs instead. --- autoload/fugitive.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index d8f51e5..91ffa6e 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -7437,9 +7437,12 @@ function! s:BrowserOpen(url, mods, echo_copy) abort else if !exists('g:loaded_netrw') runtime! autoload/netrw.vim + runtime! autoload/netrw/os.vim endif if exists('*netrw#Open') return 'echo '.string(url).'|' . mods . 'call netrw#Open('.string(url).')' + elseif exists('*netrw#os#Open') + return 'echo '.string(url).'|' . mods . 'call netrw#os#Open('.string(url).')' elseif exists('*netrw#BrowseX') return 'echo '.string(url).'|' . mods . 'call netrw#BrowseX('.string(url).', 0)' elseif exists('*netrw#NetrwBrowseX')