feat(terminal): close terminals on ExitPre. Fixes #419

This commit is contained in:
Folke Lemaitre 2025-01-20 13:02:11 +01:00
parent 7b471cfcf5
commit 2abf208f2c
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -124,6 +124,9 @@ function M.open(cmd, opts)
vim.cmd.startinsert()
end,
})
terminal:on("ExitPre", function()
terminal:close()
end)
end
vim.cmd("noh")
return terminal