diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-17 05:57:17 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-17 12:15:01 -0300 |
| commit | b06543725a84ac5ce8cc48810b526c00032247cf (patch) | |
| tree | df38c0d6594ed768e386aa91441d08207eb29ece /src/edit.zig | |
| parent | 3dd2072fc525cdadf4f55a69f745c73c0b8c2b21 (diff) | |
| download | pardes-b06543725a84ac5ce8cc48810b526c00032247cf.tar.gz pardes-b06543725a84ac5ce8cc48810b526c00032247cf.zip | |
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
Diffstat (limited to 'src/edit.zig')
| -rw-r--r-- | src/edit.zig | 4 |
1 files changed, 2 insertions, 2 deletions
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 { |
