From 779ff8cc27014b8c2f2f078985ab2ca9cf285740 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 17 Nov 2026 05:45:38 -0300 Subject: Editor: what an edit of a text runs with, out of Pardes (docs/next-editor.md, R1): src/Editor.zig is a context of the allocators and pointers to the registers, the register the running command names, the replay's multi_* and the retired text, and the core (`p`), gathered per call by `p.editor()` from where they are, so no field of Pardes or its view moves and a dump crosses builds as before (an embedded `ed: Editor` would have renamed `registers` in the dump, matched by name, and lost them at an Upgrade); setYank, registerValue, retireEditText and normal.multiOnce take it, their callers hand `p.editor()`; core-test 810 of 949, shell-test 989 of 992, hxdiff 658 / parity 738 / hxgolf 124 with 0 mismatches, replicas pass --- src/normal.zig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/normal.zig') diff --git a/src/normal.zig b/src/normal.zig index dbd35fb5..d35dd60d 100644 --- a/src/normal.zig +++ b/src/normal.zig @@ -21,14 +21,15 @@ const hit = pardes.hit; const sel_slot = pardes.sel_slot; const Pardes = pardes.Pardes; const Macro = pardes.Macro; +const Editor = pardes.Editor; fn isPrefix(key: Key, cp: u21) bool { return key.cp == cp and !key.ctrl and !key.alt; } -pub fn multiOnce(p: *Pardes) bool { - p.multi_stop = true; - return p.multi_first; +pub fn multiOnce(e: Editor) bool { + e.multi_stop.* = true; + return e.multi_first.*; } fn regexMarker(mode: modal.Normal.RegexMode) []const u8 { -- cgit v1.3