From 0444df68cd1cdabc7453d6bd84099458327e5513 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 18 Jul 2024 19:24:26 -0400 Subject: [PATCH] Use nvim vim.ui.open as a fallback Resolves: https://github.com/tpope/vim-fugitive/pull/2322 --- autoload/fugitive.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 9bab58c378..005dd3705d 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -7441,6 +7441,8 @@ function! s:BrowserOpen(url, mods, echo_copy) abort 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)' + elseif has('nvim-0.10') + return mods . 'echo luaeval("({vim.ui.open(_A)})[2] or _A", ' . string(url) . ')' else return 'echoerr ' . string('Netrw not found. Define your own :Browse to use :GBrowse') endif