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/Core.zig | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Core.zig') diff --git a/src/Core.zig b/src/Core.zig index ecfd8fa7..c57818ee 100644 --- a/src/Core.zig +++ b/src/Core.zig @@ -438,6 +438,10 @@ pub const setMessage = Messages.setMessage; pub const reportError = Messages.reportError; pub const reportFailure = Messages.reportFailure; +/// What an edit of a text runs with (Editor.zig), gathered from this core: +/// called from everywhere as `edit.f(p.editor(), t, ...)`. +pub const editor = pardes.Editor.of; + /// Running a builtin line, called from everywhere as /// `p.executeBuiltinLine(...)`; it lives with the rest of exec in exec.zig. pub const executeBuiltinLine = exec.executeBuiltinLine; -- cgit v1.3