summaryrefslogtreecommitdiff
path: root/test/output.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-27 20:14:04 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:14 -0300
commitacd9e032a147f4aa7ad49110dc2f4fb945e7a9bb (patch)
tree6b81d7ac0b759472bd5c1afb1fc15cd6c930ac79 /test/output.zig
parent28c814aa5cfea23e8950ef007916ffc5d089288d (diff)
downloadpardes-acd9e032a147f4aa7ad49110dc2f4fb945e7a9bb.tar.gz
pardes-acd9e032a147f4aa7ad49110dc2f4fb945e7a9bb.zip
Keep a pane's filesystem state on the Pane instead of a slot-indexed table
addr, limit, the event queue and its readers, pty/data's queue, a waiting run and the /log announcement flag lived in p.fs.panes[slot], reset when the pane went; a reused slot is how the bug class came in. acme keeps the same state on its Window (editors/acme/dat.h:226-266), so now Pane.fs holds it: announced, retired (noteRetire, which still answers a waiting run and drops the listener count first) and freed with the pane itself. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test/output.zig')
-rw-r--r--test/output.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/output.zig b/test/output.zig
index 7c80e105..cda5f556 100644
--- a/test/output.zig
+++ b/test/output.zig
@@ -1082,7 +1082,7 @@ test "identical result refresh keeps warm content caches without allocation" {
try std.testing.expectEqual(id, source.search_pane.?);
try std.testing.expectEqual(@as(usize, 1), source.search_row.?);
try std.testing.expectEqual(result.serial, p.look_walk_owner.?);
- try std.testing.expect(p.fs.panes[id].events.empty());
+ try std.testing.expect(p.panes[id].?.fs.events.empty());
}
try panes.Output.fillResults(p, 0, "/tmp", .{ .query = .references }, "changed", try p.gpa.dupe(u8, "short\n"), null);
@@ -1099,7 +1099,7 @@ test "identical result refresh keeps warm content caches without allocation" {
try std.testing.expectEqual(@as(usize, 0), file.scroll);
try std.testing.expectEqual(@as(i32, 0), result.hscroll);
try std.testing.expect(source.search_row == null);
- const events = &p.fs.panes[id].events;
+ const events = &p.panes[id].?.fs.events;
try std.testing.expect(std.mem.startsWith(u8, events.peek().?, "KD"));
events.pop();
try std.testing.expect(std.mem.startsWith(u8, events.peek().?, "KI"));