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`
This commit is contained in:
luca-sartore-prorob
2025-07-19 16:01:11 +02:00
committed by GitHub
parent 4839ab6429
commit 0cb05f46bf

View File

@@ -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