summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-04 23:33:59 -0300
committerGabriel Schneider <[email protected]>2026-11-05 01:00:59 -0300
commitef78fbd9cefc17da4f4be82545a055ea4c6b591c (patch)
tree9db377baaf08528e4594dddbcb70147705069336 /src/pardes.zig
parent463f319643848b9361eef140497b5a166e3945e3 (diff)
downloadpardes-ef78fbd9cefc17da4f4be82545a055ea4c6b591c.tar.gz
pardes-ef78fbd9cefc17da4f4be82545a055ea4c6b591c.zip
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 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig13
1 files changed, 2 insertions, 11 deletions
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;