mirror of
https://github.com/folke/snacks.nvim
synced 2025-08-06 11:48:23 +00:00
feat(dashboard): allow terminal sections to have actions. Closes #189
This commit is contained in:
parent
81a5382214
commit
78f44f720b
1 changed files with 2 additions and 1 deletions
|
@ -990,6 +990,7 @@ function M.sections.terminal(opts)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return {
|
return {
|
||||||
|
action = opts.action,
|
||||||
render = function(_, pos)
|
render = function(_, pos)
|
||||||
self:trace("terminal.render")
|
self:trace("terminal.render")
|
||||||
local win = vim.api.nvim_open_win(buf, false, {
|
local win = vim.api.nvim_open_win(buf, false, {
|
||||||
|
@ -1018,7 +1019,7 @@ function M.sections.terminal(opts)
|
||||||
self.on("Closed", close, self.augroup)
|
self.on("Closed", close, self.augroup)
|
||||||
self:trace()
|
self:trace()
|
||||||
end,
|
end,
|
||||||
text = ("\n"):rep(height - 1),
|
text = ("terminal\n"):rep(height - 1),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue