From d5158f6a69ce5a1af6372c140b07379ee0ba2446 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 00:35:15 -0300 Subject: Text, edit, normal, look, Query and their readers: the second selection form msel (whole rows r0..r1, for search-result highlights) goes; a visited search result and a query preview's place line are an explicit vsel like any other, back from the line's end (to the result's location start, the line's start for ordinary path:line rows; to the start for a preview line), and every msel branch in the edit ops, the drawing, the terminal's position tracking and the chords goes (visible: the result's highlight covers its line's characters and newline cell instead of the whole row width, with the ordinary selection colours; y, d and c on it act on that range as after x, its newline included, so a yanked result pastes as a line); selections.md and the ; Alt-; X Alt-x rows of helix-keys.md no longer describe msel; Text's walked shape changes (wire semantics) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/pardes.zig | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/pardes.zig') diff --git a/src/pardes.zig b/src/pardes.zig index e46eb5f7..2335711f 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -6177,7 +6177,7 @@ pub const Pardes = struct { const range = t.primaryRange(shown, 0); const lo = @min(range.anchor, range.head); const hi = @max(range.anchor, range.head); - const span: [2]usize = if ((t.vsel.active and t.vsel.explicit) or t.msel.active) + const span: [2]usize = if (t.vsel.active and t.vsel.explicit) .{ lo, hi } else word: { const b = config.wordBounds(shown, modal.selectionCursor(shown, range)); @@ -6202,12 +6202,11 @@ pub const Pardes = struct { } edit.pinPaneCursor(p, &pane.body); const explicit = (p.native_images and pane.hasPdfSelection()) or - (pane.body.vsel.active and pane.body.vsel.explicit) or pane.body.msel.active; + (pane.body.vsel.active and pane.body.vsel.explicit); if (explicit) { if (exec.chordEachSel(p, pane, cmd)) return; if (edit.currentSelText(p, pane)) |txt| { pane.body.vsel.active = false; - pane.body.msel.active = false; pane.body.select = false; // The execute key on a body: text a bound REPL may take. exec.runBuiltinFrom(p, cmd, p.active, "", txt, true); @@ -6225,13 +6224,13 @@ pub const Pardes = struct { if (t.what == .tag and t.mode == .insert and tagline.typedIntoName(p, pane, key)) return; // A tag's prefix is read-only: a key whose edit reached into it // changes nothing, not even where the cursor is. - const kept = .{ t.cur_row, t.cur_col, t.vsel, t.msel }; + const kept = .{ t.cur_row, t.cur_col, t.vsel }; var kept_sels: [Text.max_selections - 1]Text.SelRange = undefined; const kept_n = t.nsel; @memcpy(kept_sels[0..kept_n], t.sels[0..kept_n]); t.refused = false; defer if (t.refused) { - t.cur_row, t.cur_col, t.vsel, t.msel = kept; + t.cur_row, t.cur_col, t.vsel = kept; t.restoreSels(kept_sels[0..kept_n]); }; const was = t.mode; @@ -6623,7 +6622,6 @@ pub const Pardes = struct { pane.body.cur_row = @intCast(cursor.row); pane.body.cur_col = @intCast(cursor.col); pane.body.vsel.active = false; - pane.body.msel.active = false; pane.body.select = false; pane.body.sticky_col = -1; pane.ensureCursorVisible(); -- cgit v1.3