From b06543725a84ac5ce8cc48810b526c00032247cf Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 17 Nov 2026 05:57:17 -0300 Subject: normal: a normal-mode action splits into the text's roles and the core's (docs/next-editor.md, R2, third slice): textAction takes `e: Editor` and does the 58 roles of the text alone (motions, selections, edits, undo, registers, Esc's and `*`'s own part), textRole says which those are, and executeNormalAction keeps the 34 that reach past the text (views, builtins, prompts, LSP, the look ring, jump labels, macros), handing the rest over; replaySels, handleNormal, searchStep and searchSelection take the context, keys.zig hands `p.editor()`; nothing a key does changes; core-test 810 of 949, shell-test 989 of 992, hxdiff 658 / parity 738 / hxgolf 124 with 0 mismatches, replicas pass --- src/edit.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/edit.zig') diff --git a/src/edit.zig b/src/edit.zig index 9ae00079..4b0e59fe 100644 --- a/src/edit.zig +++ b/src/edit.zig @@ -187,7 +187,7 @@ pub fn clipYank(p: *Pardes, pane: *Pane, main_only: bool) void { return; } if (pane.body.nsel > 0 and !main_only) { - normal.replaySels(p, &pane.body, .{ .normal = .{ .role = .yank } }); + normal.replaySels(p.editor(), &pane.body, .{ .normal = .{ .role = .yank } }); } else { const others = pane.body.nsel; pane.body.nsel = 0; @@ -901,7 +901,7 @@ pub fn enterInsert(e: Editor, t: *Text, where: InsertAt, cnt: usize) Error!void pub fn handleInsert(e: Editor, t: *Text, key: Key) void { if (t.nsel == 0) return insertKey(e, t, key) catch |err| e.reportError(err); - normal.replaySels(e.p, t, .{ .insert = key }); + normal.replaySels(e, t, .{ .insert = key }); } pub fn insertKey(e: Editor, t: *Text, key: Key) Error!void { -- cgit v1.3