From e9f51388f7760630eb9cec80c2b326495cd7d969 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Wed, 10 Dec 2025 15:59:09 +0100 Subject: [PATCH] refactor: show keybindview when started with --show-input --- src/tui/mainview.zig | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/tui/mainview.zig b/src/tui/mainview.zig index cbd8db0..0b5fdb7 100644 --- a/src/tui/mainview.zig +++ b/src/tui/mainview.zig @@ -109,8 +109,10 @@ pub fn create(allocator: std.mem.Allocator) CreateError!Widget { if (tui.config().bottom_bar.len > 0) { self.bottom_bar = (try widgets.addP(try @import("status/bar.zig").create(allocator, self.plane, tui.config().bottom_bar, .grip, EventHandler.bind(self, handle_bottom_bar_event)))).*; } - if (tp.env.get().is("show-input")) + if (tp.env.get().is("show-input")) { self.toggle_inputview_async(); + self.toggle_keybindview_async(); + } if (tp.env.get().is("show-log")) self.toggle_logview_async(); return w; @@ -1650,6 +1652,10 @@ fn toggle_inputview_async(_: *Self) void { tp.self_pid().send(.{ "cmd", "toggle_inputview" }) catch return; } +fn toggle_keybindview_async(_: *Self) void { + tp.self_pid().send(.{ "cmd", "toggle_keybindview" }) catch return; +} + fn show_file_async(_: *Self, file_path: []const u8) void { tp.self_pid().send(.{ "cmd", "navigate", .{ .file = file_path } }) catch return; }