mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 11:33:47 -05:00
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.
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user