From bcef17a4664659a997cdef48a855664f4c481f8a Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Wed, 24 Sep 2025 13:59:56 +0200 Subject: [PATCH] fix: make sure we don't destroy file_path before navigating in open_file mini mode --- src/tui/mode/mini/open_file.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tui/mode/mini/open_file.zig b/src/tui/mode/mini/open_file.zig index 07f70e4..fc13d55 100644 --- a/src/tui/mode/mini/open_file.zig +++ b/src/tui/mode/mini/open_file.zig @@ -37,9 +37,9 @@ pub fn select(self: *Type) void { var buf = std.ArrayList(u8).init(self.allocator); defer buf.deinit(); const file_path = project_manager.expand_home(&buf, self.file_path.items); - command.executeName("exit_mini_mode", .{}) catch {}; if (root.is_directory(file_path)) tp.self_pid().send(.{ "cmd", "change_project", .{file_path} }) catch {} else if (file_path.len > 0) tp.self_pid().send(.{ "cmd", "navigate", .{ .file = file_path } }) catch {}; + command.executeName("exit_mini_mode", .{}) catch {}; }