Skip to content

Commit

Permalink
Use nvim vim.ui.open as a fallback
Browse files Browse the repository at this point in the history
Resolves: #2322
  • Loading branch information
tpope committed Jul 18, 2024
1 parent 8c8cdf4 commit 0444df6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions autoload/fugitive.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0444df6

Please sign in to comment.