feat(dashboard): allow terminal sections to have actions. Closes #189

This commit is contained in:
Folke Lemaitre 2024-12-02 12:15:21 +01:00
parent 81a5382214
commit 78f44f720b
No known key found for this signature in database
GPG key ID: 41F8B1FBACAE2040

View file

@ -990,6 +990,7 @@ function M.sections.terminal(opts)
end
end
return {
action = opts.action,
render = function(_, pos)
self:trace("terminal.render")
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:trace()
end,
text = ("\n"):rep(height - 1),
text = ("terminal\n"):rep(height - 1),
}
end
end