From 0cb05f46bf746f346eac0878aa2951bf2d910a0e Mon Sep 17 00:00:00 2001 From: luca-sartore-prorob <59091319+lucaSartore@users.noreply.github.com> Date: Sat, 19 Jul 2025 16:01:11 +0200 Subject: [PATCH] fix: update deprecated vim api usage (#155) replace `termopen` (deprecated according to [the docs](https://neovim.io/doc/user/deprecated.html#deprecated-0.11)) with `jobstart` --- lua/lazygit.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/lazygit.lua b/lua/lazygit.lua index 4b4b917..af8a5da 100644 --- a/lua/lazygit.lua +++ b/lua/lazygit.lua @@ -46,7 +46,13 @@ local function exec_lazygit_command(cmd) if LAZYGIT_LOADED == false then -- ensure that the buffer is closed on exit vim.g.lazygit_opened = 1 - vim.fn.termopen(cmd, { on_exit = on_exit }) + + local command = {} + for arg in string.gmatch(cmd, "%S+") do + table.insert(command, arg) + end + + vim.fn.jobstart(command, { term = true, on_exit = on_exit} ) end vim.cmd("startinsert") end