From acd9e032a147f4aa7ad49110dc2f4fb945e7a9bb Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 27 Sep 2026 20:14:04 -0300 Subject: 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 --- test/fs_bench.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/fs_bench.zig') diff --git a/test/fs_bench.zig b/test/fs_bench.zig index 74b7b5da..00601ca3 100644 --- a/test/fs_bench.zig +++ b/test/fs_bench.zig @@ -285,7 +285,7 @@ pub fn main(init: std.process.Init) !void { const initial_bytes = pane.file.?.content.len; key_body_bytes = initial_bytes; if (scripted) { - keys.core.fs.panes[keys.file_id].readers = 1; + keys.core.panes[keys.file_id].?.fs.readers = 1; keys.core.fs.listeners = 1; } counting.allocations = 0; @@ -297,7 +297,7 @@ pub fn main(init: std.process.Init) !void { const elapsed = nowNs() - start; if (pane.file.?.content.len != initial_bytes + key_reps or pane.cur_col != key_reps or !std.mem.allEqual(u8, pane.file.?.content[0..key_reps], 'x')) return error.MissingKeystroke; - const events = &keys.core.fs.panes[keys.file_id].events; + const events = &keys.core.panes[keys.file_id].?.fs.events; if (scripted) for (0..key_reps) |i| { var buf: [64]u8 = undefined; const expected = try std.fmt.bufPrint(&buf, "KI{d} {d} 0 1 x\n", .{ i, i + 1 }); -- cgit v1.3