From a639201807aab9ae7a8dfa35508cb3490e523331 Mon Sep 17 00:00:00 2001 From: CJ van den Berg Date: Wed, 26 Nov 2025 19:21:23 +0100 Subject: [PATCH] fix: remove extra close_file call in mainview.extract_state --- src/tui/mainview.zig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/tui/mainview.zig b/src/tui/mainview.zig index 322d1eb..334389f 100644 --- a/src/tui/mainview.zig +++ b/src/tui/mainview.zig @@ -1740,11 +1740,9 @@ fn extract_state(self: *Self, iter: *[]const u8) !void { for (buffers) |buffer| if (!buffer.is_ephemeral()) send_buffer_did_open(self.allocator, buffer) catch {}; - if (editor_file_path) |file_path| { + if (editor_file_path) |file_path| if (self.buffer_manager.get_buffer_for_file(file_path)) |_| - return tp.self_pid().send(.{ "cmd", "navigate", .{ .file = file_path } }); - } - try tp.self_pid().send(.{ "cmd", "close_file" }); + try tp.self_pid().send(.{ "cmd", "navigate", .{ .file = file_path } }); } fn send_buffer_did_open(allocator: std.mem.Allocator, buffer: *Buffer) !void {