fix(lazygit): use lazy.util.open on Neovim <= 0.10 (#3778)

## What is this PR for?
Use `lazy.util.open` on Neovim <=0.10
<!-- Describe the big picture of your changes to communicate to the
maintainers
  why we should accept this pull request. -->

## Does this PR fix an existing issue?
Closes #3776
<!--
  If this PR fixes any issues, please link to the issue here.
  Fixes #<issue_number>
-->

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
This commit is contained in:
Iordanis Petkakis
2024-06-23 16:38:27 +03:00
committed by GitHub
parent abec8fbb03
commit 8ea3f690e6

View File

@ -176,6 +176,10 @@ function M.browse()
local function open(remote)
if remote then
LazyVim.info(("Opening [%s](%s)"):format(remote.name, remote.url))
if vim.fn.has("nvim-0.10") == 0 then
require("lazy.util").open(remote.url, { system = true })
return
end
vim.ui.open(remote.url)
end
end