From 8ea3f690e6017ba37022060a62f1d69fbf3aeaf7 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Sun, 23 Jun 2024 16:38:27 +0300 Subject: [PATCH] fix(lazygit): use `lazy.util.open` on Neovim <= 0.10 (#3778) ## What is this PR for? Use `lazy.util.open` on Neovim <=0.10 ## Does this PR fix an existing issue? Closes #3776 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/util/lazygit.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/lazyvim/util/lazygit.lua b/lua/lazyvim/util/lazygit.lua index c9ac1bb8..d69941df 100644 --- a/lua/lazyvim/util/lazygit.lua +++ b/lua/lazyvim/util/lazygit.lua @@ -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