feat(tabs): complete tabs widget and next_/previous_tabs

This commit is contained in:
CJ van den Berg 2025-01-24 23:26:41 +01:00
parent 41b230d17f
commit 5dd47f7248
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
4 changed files with 135 additions and 45 deletions

View file

@ -744,6 +744,16 @@ const cmds = struct {
tui.rdr().reset_fontface();
}
pub const reset_fontface_meta = .{ .description = "Reset font to configured face" };
pub fn next_tab(self: *Self, _: Ctx) Result {
_ = try self.widgets_widget.msg(.{"next_tab"});
}
pub const next_tab_meta = .{ .description = "Switch to next tab" };
pub fn previous_tab(self: *Self, _: Ctx) Result {
_ = try self.widgets_widget.msg(.{"previous_tab"});
}
pub const previous_tab_meta = .{ .description = "Switch to previous tab" };
};
pub fn handle_editor_event(self: *Self, _: tp.pid_ref, m: tp.message) tp.result {