From d14f0de0183c0f567cf090bcb1f161fc1a314e97 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Mon, 1 Dec 2025 12:47:11 +0100 Subject: [PATCH] refactor: clean-up duplicate commands overlay_toggle_panel/_inputivew --- src/keybind/builtin/flow.json | 3 --- src/tui/mode/overlay/open_recent.zig | 10 ---------- src/tui/mode/overlay/palette.zig | 10 ---------- src/tui/mode/overlay/vcs_status.zig | 10 ---------- 4 files changed, 33 deletions(-) diff --git a/src/keybind/builtin/flow.json b/src/keybind/builtin/flow.json index 264a25b..25a5769 100644 --- a/src/keybind/builtin/flow.json +++ b/src/keybind/builtin/flow.json @@ -25,7 +25,6 @@ ["ctrl+shift+p", "open_command_palette"], ["ctrl+shift+q", "quit_without_saving"], ["ctrl+shift+f", "find_in_files"], - ["ctrl+shift+l", "toggle_panel"], ["alt+shift+p", "open_command_palette"], ["alt+n", "goto_next_file_or_diagnostic"], ["alt+p", "goto_prev_file_or_diagnostic"], @@ -405,8 +404,6 @@ ["ctrl+shift+p", "palette_menu_down"], ["ctrl+shift+q", "quit_without_saving"], ["ctrl+shift+w", "close_file_without_saving"], - ["ctrl+shift+l", "overlay_toggle_panel"], - ["ctrl+shift+i", "overlay_toggle_inputview"], ["alt+shift+p", "palette_menu_down"], ["alt+p", "palette_menu_up"], ["alt+l", "toggle_panel"], diff --git a/src/tui/mode/overlay/open_recent.zig b/src/tui/mode/overlay/open_recent.zig index 6de797d..5a41ea4 100644 --- a/src/tui/mode/overlay/open_recent.zig +++ b/src/tui/mode/overlay/open_recent.zig @@ -405,16 +405,6 @@ const cmds = struct { } pub const overlay_insert_bytes_meta: Meta = .{ .arguments = &.{.string} }; - pub fn overlay_toggle_panel(self: *Self, _: Ctx) Result { - return self.cmd_async("toggle_panel"); - } - pub const overlay_toggle_panel_meta: Meta = .{}; - - pub fn overlay_toggle_inputview(self: *Self, _: Ctx) Result { - return self.cmd_async("toggle_inputview"); - } - pub const overlay_toggle_inputview_meta: Meta = .{}; - pub fn overlay_next_widget_style(self: *Self, _: Ctx) Result { tui.set_next_style(widget_type); self.do_resize(); diff --git a/src/tui/mode/overlay/palette.zig b/src/tui/mode/overlay/palette.zig index 0d92655..53b9d0e 100644 --- a/src/tui/mode/overlay/palette.zig +++ b/src/tui/mode/overlay/palette.zig @@ -598,16 +598,6 @@ pub fn Create(options: type) type { } pub const overlay_insert_bytes_meta: Meta = .{ .arguments = &.{.string} }; - pub fn overlay_toggle_panel(self: *Self, _: Ctx) Result { - return self.cmd_async("toggle_panel"); - } - pub const overlay_toggle_panel_meta: Meta = .{}; - - pub fn overlay_toggle_inputview(self: *Self, _: Ctx) Result { - return self.cmd_async("toggle_inputview"); - } - pub const overlay_toggle_inputview_meta: Meta = .{}; - pub fn overlay_next_widget_style(self: *Self, _: Ctx) Result { tui.set_next_style(widget_type); const padding = tui.get_widget_style(widget_type).padding; diff --git a/src/tui/mode/overlay/vcs_status.zig b/src/tui/mode/overlay/vcs_status.zig index 2ecfc41..b25b698 100644 --- a/src/tui/mode/overlay/vcs_status.zig +++ b/src/tui/mode/overlay/vcs_status.zig @@ -366,16 +366,6 @@ const cmds = struct { } pub const overlay_insert_bytes_meta: Meta = .{ .arguments = &.{.string} }; - pub fn overlay_toggle_panel(self: *Self, _: Ctx) Result { - return self.cmd_async("toggle_panel"); - } - pub const overlay_toggle_panel_meta: Meta = .{}; - - pub fn overlay_toggle_inputview(self: *Self, _: Ctx) Result { - return self.cmd_async("toggle_inputview"); - } - pub const overlay_toggle_inputview_meta: Meta = .{}; - pub fn overlay_next_widget_style(self: *Self, _: Ctx) Result { tui.set_next_style(widget_type); self.do_resize();