diff options
Diffstat (limited to 'src/fs.zig')
| -rw-r--r-- | src/fs.zig | 14 |
1 files changed, 1 insertions, 13 deletions
@@ -586,7 +586,7 @@ test "virtual body writes can read their input from the same pane" { try write(p, path, pane.file.?.content); try std.testing.expectEqualStrings("same pane contents\n", pane.file.?.content); try std.testing.expectEqual(@as(usize, 2), pane.file.?.history.undo_len); - const events = &p.fs.panes[p.active].events; + const events = &p.panes[p.active].?.fs.events; try std.testing.expect(std.mem.startsWith(u8, events.peek().?, "ED")); events.pop(); try std.testing.expect(std.mem.startsWith(u8, events.peek().?, "EI")); @@ -1240,7 +1240,6 @@ pub const Namespace = struct { snapshots: [tree.screen.snapshot_slots]tree.screen.Snapshot = @splat(.{}), runs: [tree.pty.run_slots]tree.pty.Run = @splat(.{}), out: std.ArrayList(u8) = .empty, - panes: [MAX_PANES]tree.pane.State = @splat(.{}), listeners: u16 = 0, origin: u8 = 'K', /// Reads that found nothing yet, one per open that can wait: the log's @@ -1269,7 +1268,6 @@ pub const Namespace = struct { st.os_paths.deinit(gpa); for (st.snapshots) |snapshot| if (snapshot.bytes) |bytes| gpa.free(bytes); for (&st.runs) |*slot| slot.reset(gpa, 0); - for (&st.panes) |*pf| pf.deinit(gpa); st.log.deinit(gpa); st.out.deinit(gpa); } @@ -1292,16 +1290,6 @@ pub const Namespace = struct { st.out.ensureTotalCapacity(gpa, tree.out_reserve) catch {}; return &st.out; } - - pub fn forget(st: *Namespace, gpa: std.mem.Allocator, id: usize) void { - if (id >= MAX_PANES) return; - st.listeners -= @min(st.listeners, st.panes[id].readers); - st.panes[id].deinit(gpa); - } - - pub fn scripted(st: *const Namespace, id: usize) bool { - return id < MAX_PANES and st.panes[id].readers != 0; - } }; pub fn unmount(p: *Pardes, name: []const u8) !void { |
