From 2b04f877c29cf1e95c2fc8154de1da322c7299a3 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 17 Nov 2026 05:49:29 -0300 Subject: edit: the routing of a text's characters takes the editing context (docs/next-editor.md, R2, first slice): flatSurface, editText, editTextEol, setEditText, setEditTextEnd, setEditTextSpan, paneCursorLines, paneByteAtDisplay, pinPaneCursor, paneWrapWidth, treeIndent, pushUndo, undoStep, stepOwn, selText and vselText take `e: Editor` where they took `*Pardes`, the pane they route to reached through `e.p`; 149 calls in 16 files hand `p.editor()`, nothing else changes; core-test 810 of 949, shell-test 989 of 992, hxdiff 658 / parity 738 / hxgolf 124 with 0 mismatches, replicas pass --- src/exec.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/exec.zig') diff --git a/src/exec.zig b/src/exec.zig index 4ab5a37f..f2fb30d4 100644 --- a/src/exec.zig +++ b/src/exec.zig @@ -32,7 +32,7 @@ const Pardes = pardes.Pardes; pub fn chordEachSel(p: *Pardes, pane: *Pane, cmd: Builtin) bool { const v = p.view(); if (pane.body.nsel == 0) return false; - const text = edit.flatSurface(p, &pane.body) catch return false; + const text = edit.flatSurface(p.editor(), &pane.body) catch return false; var ranges: [panes.Text.max_selections]modal.Selection = undefined; const got = pane.body.ranges(text, 0, &ranges); if (got.n < 2) return false; @@ -118,7 +118,7 @@ pub fn operandAt(p: *Pardes, pane: *Pane, clicked: Pane.Sel, borrow: bool, for_l @as(i32, @intCast(panes.File.rawAtDisplay(raw_line, @intCast(@max(0, clicked.c0))))) else if (clicked.r0 >= pane.tag_rows) edit.paneByteAtDisplay( - p, + p.editor(), &pane.body, wrapped.line, wrapped.at, -- cgit v1.3