mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-05 11:18:26 +00:00
feat(terminal): close terminals on ExitPre
. Fixes #419
This commit is contained in:
parent
7b471cfcf5
commit
2abf208f2c
1 changed files with 3 additions and 0 deletions
|
@ -124,6 +124,9 @@ function M.open(cmd, opts)
|
||||||
vim.cmd.startinsert()
|
vim.cmd.startinsert()
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
terminal:on("ExitPre", function()
|
||||||
|
terminal:close()
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
vim.cmd("noh")
|
vim.cmd("noh")
|
||||||
return terminal
|
return terminal
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue