From fcb4db52e7f65b95705aa58f0f2df1312c1f2df2 Mon Sep 17 00:00:00 2001 From: embedded Date: Mon, 16 Dec 2024 00:44:08 +0100 Subject: [PATCH] Use netrw#Open if available (#2361) --- autoload/fugitive.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 5e69102..2073b36 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 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)'