diff --git a/src/tui.zig b/src/tui.zig index 07aaf4e..3b5b183 100644 --- a/src/tui.zig +++ b/src/tui.zig @@ -1379,23 +1379,6 @@ pub const App = struct { self.reloadPortfolioFile(); return ctx.consumeAndRedraw(); }, - .collapse_all_puts => { - if (self.active_tab == .options) { - tab_modules.options.tab.handleAction(&self.states.options, self, tab_modules.options.Action.collapse_all_puts); - return ctx.consumeAndRedraw(); - } - }, - .options_filter_1, .options_filter_2, .options_filter_3, .options_filter_4, .options_filter_5, .options_filter_6, .options_filter_7, .options_filter_8, .options_filter_9 => { - if (self.active_tab == .options) { - const n = @intFromEnum(action) - @intFromEnum(keybinds.Action.options_filter_1) + 1; - // Route through tab.handleAction so the dispatch - // table is consistent with the framework. Each - // filter_N maps directly to tab_modules.options.Action.filter_N. - const tab_action: tab_modules.options.Action = @enumFromInt(@intFromEnum(tab_modules.options.Action.filter_1) + n - 1); - tab_modules.options.tab.handleAction(&self.states.options, self, tab_action); - return ctx.consumeAndRedraw(); - } - }, .sort_col_next => { if (self.active_tab == .portfolio) { tab_modules.portfolio.tab.handleAction(&self.states.portfolio, self, tab_modules.portfolio.Action.sort_col_next); diff --git a/src/tui/keybinds.zig b/src/tui/keybinds.zig index 69a67bc..62526c6 100644 --- a/src/tui/keybinds.zig +++ b/src/tui/keybinds.zig @@ -27,16 +27,6 @@ pub const Action = enum { symbol_input, help, reload_portfolio, - collapse_all_puts, - options_filter_1, - options_filter_2, - options_filter_3, - options_filter_4, - options_filter_5, - options_filter_6, - options_filter_7, - options_filter_8, - options_filter_9, sort_col_next, sort_col_prev, sort_reverse, @@ -169,16 +159,6 @@ pub const global_default_bindings = [_]Binding{ .{ .action = .symbol_input, .key = .{ .codepoint = '/' } }, .{ .action = .help, .key = .{ .codepoint = '?' } }, .{ .action = .reload_portfolio, .key = .{ .codepoint = 'R' } }, - .{ .action = .collapse_all_puts, .key = .{ .codepoint = 'p' } }, - .{ .action = .options_filter_1, .key = .{ .codepoint = '1', .mods = .{ .ctrl = true } } }, - .{ .action = .options_filter_2, .key = .{ .codepoint = '2', .mods = .{ .ctrl = true } } }, - .{ .action = .options_filter_3, .key = .{ .codepoint = '3', .mods = .{ .ctrl = true } } }, - .{ .action = .options_filter_4, .key = .{ .codepoint = '4', .mods = .{ .ctrl = true } } }, - .{ .action = .options_filter_5, .key = .{ .codepoint = '5', .mods = .{ .ctrl = true } } }, - .{ .action = .options_filter_6, .key = .{ .codepoint = '6', .mods = .{ .ctrl = true } } }, - .{ .action = .options_filter_7, .key = .{ .codepoint = '7', .mods = .{ .ctrl = true } } }, - .{ .action = .options_filter_8, .key = .{ .codepoint = '8', .mods = .{ .ctrl = true } } }, - .{ .action = .options_filter_9, .key = .{ .codepoint = '9', .mods = .{ .ctrl = true } } }, .{ .action = .sort_col_next, .key = .{ .codepoint = '>' } }, .{ .action = .sort_col_prev, .key = .{ .codepoint = '<' } }, .{ .action = .sort_reverse, .key = .{ .codepoint = 'o' } },