fix: remove extra close_file call in mainview.extract_state
This commit is contained in:
parent
7dcde628ac
commit
a639201807
1 changed files with 2 additions and 4 deletions
|
|
@ -1740,11 +1740,9 @@ fn extract_state(self: *Self, iter: *[]const u8) !void {
|
||||||
for (buffers) |buffer| if (!buffer.is_ephemeral())
|
for (buffers) |buffer| if (!buffer.is_ephemeral())
|
||||||
send_buffer_did_open(self.allocator, buffer) catch {};
|
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)) |_|
|
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", "navigate", .{ .file = file_path } });
|
||||||
}
|
|
||||||
try tp.self_pid().send(.{ "cmd", "close_file" });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn send_buffer_did_open(allocator: std.mem.Allocator, buffer: *Buffer) !void {
|
fn send_buffer_did_open(allocator: std.mem.Allocator, buffer: *Buffer) !void {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue