From ef78fbd9cefc17da4f4be82545a055ea4c6b591c Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 4 Nov 2026 23:33:59 -0300 Subject: mouse: a header drag takes its point from headerPoint, as a press does, where it worked the same offset out again line for line; reportGesture, a call of reportRange, is that call at its one caller; Pardes.reprojectBodyHit, which ignored its receiver, is Layer.bodyAgain where it was called; wordAtCol is wordBoundsAtCol sliced at its one caller; seamIdxAt is mouse.zig's own (events.zig's comment names reportRange) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/pardes.zig | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/pardes.zig') diff --git a/src/pardes.zig b/src/pardes.zig index f1a804fc..bd79741f 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -2637,6 +2637,8 @@ comptime { const WordBounds = struct { lo: usize, hi: usize }; +/// The space-delimited word covering `col` in `str` (a header's click and +/// hover), null on a space or past the end. pub fn wordBoundsAtCol(str: []const u8, col: usize) ?WordBounds { if (col >= str.len or str[col] == ' ') return null; var lo: usize = col; @@ -2646,12 +2648,6 @@ pub fn wordBoundsAtCol(str: []const u8, col: usize) ?WordBounds { return .{ .lo = lo, .hi = hi }; } -/// the whitespace-delimited word covering `col` in `str` (topbar dispatch) -pub fn wordAtCol(str: []const u8, col: usize) []const u8 { - const bounds = wordBoundsAtCol(str, col) orelse return ""; - return str[bounds.lo..bounds.hi]; -} - /// `a` IS `b` or lives under it — how Grep drops a pane's directory when /// another pane's directory already covers it pub fn pathUnder(a: []const u8, b: []const u8) bool { @@ -7561,11 +7557,6 @@ pub const Pardes = struct { return layer.capacity(p.row_metrics); } - /// A frontend's body hit, resolved on the place it carries. - pub fn reprojectBodyHit(_: *const Pardes, body_hit: Mouse.BodyHit) ?Mouse.BodyHit { - return Layer.bodyAgain(body_hit); - } - // ---- render: build the canonical surface (draw.zig) ---- pub const render = draw.render; -- cgit v1.3