From 95a3a1bb822e583988bfe0f312d0ef219b27a454 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sun, 27 Sep 2026 23:06:11 -0300 Subject: Give a pane's body its own Text holding the cursor, selections, mode and undo acme keeps what edits a text in its Text (dat.h:171-190) and the window holds a body and a tag of that type. The cursor, the selections, the modal state and the edit-buffer undo move off Pane into Text.zig, Pane holds them as its body, and the edit and normal-mode operations take the Text they edit. Nothing changes in behaviour; this is the step that lets the tag become a second Text. 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 00601ca3..a816ebbd 100644 --- a/test/fs_bench.zig +++ b/test/fs_bench.zig @@ -281,7 +281,7 @@ pub fn main(init: std.process.Init) !void { var keys = try Session.init(&counting, 32 * 1024); defer keys.deinit(); const pane = keys.core.panes[keys.file_id].?; - pane.mode = .insert; + pane.body.mode = .insert; const initial_bytes = pane.file.?.content.len; key_body_bytes = initial_bytes; if (scripted) { @@ -295,7 +295,7 @@ pub fn main(init: std.process.Init) !void { while (keys.core.nextEffect()) |_| {} } const elapsed = nowNs() - start; - if (pane.file.?.content.len != initial_bytes + key_reps or pane.cur_col != key_reps or + if (pane.file.?.content.len != initial_bytes + key_reps or pane.body.cur_col != key_reps or !std.mem.allEqual(u8, pane.file.?.content[0..key_reps], 'x')) return error.MissingKeystroke; const events = &keys.core.panes[keys.file_id].?.fs.events; if (scripted) for (0..key_reps) |i| { -- cgit v1.3