From 911215846f1d5a9b2e37a00e74fb9266d4a0884a Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 31 Jul 2026 11:42:18 -0300 Subject: a Look path can name a range, and search selects what it found MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit file:LINE:COL-ENDLINE:ENDCOL, with the two short forms people actually type reading naturally: file:412:9-21 on one line, file:412-418 whole ones. Ends are inclusive. A path feature, not a search feature — a ranged path typed in a tag or middle-clicked out of a shell's output selects just the same; search is only its first consumer. The dash is the fussy part. `-` was already a file char, so a ranged word survives click expansion whole, but a range needs a number on BOTH sides or my-file:10, build-2 and 2026-07-30 would stop being paths. Table-driven test in look.zig for exactly that. Selecting goes through the cellRange/setPaneRange pair the multi-cursor work left, and hxOff clamps both ends, so a stale range selects what still exists rather than crashing or reaching past EOF — pinned with an 8:6-400:9 range in a nine-line file. Producers: / search, Grep, and five LSP sites through a new spanRow — goto, references, rename tokens and both symbol lists were throwing away real protocol ranges at path:line:col. Left alone deliberately: Find rows are bare paths with nothing to span, a jump is a spot not a span, and the diagnostic and format paths only ever have a point, where half a range would be worse than none. One knock-on worth knowing: n now leaves an EXPLICIT selection, so a topbar execute chords it. grep.snap's no-match step was silently becoming `Grep TARGET`; it runs from the leader path now, which never chords, and the dedicated chord steps stayed where they were. --- test/snapshots/lsp.golden | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'test/snapshots/lsp.golden') diff --git a/test/snapshots/lsp.golden b/test/snapshots/lsp.golden index 32d5b6d0..85c5c9ce 100644 --- a/test/snapshots/lsp.golden +++ b/test/snapshots/lsp.golden @@ -80,7 +80,7 @@ | | | -== snap definition grid=120x40 cursor=10,4 +== snap definition grid=120x40 cursor=15,4 |Kill Newcol Tutor Debug NextColor Dump Find Grep Help | NOR /tmp/pardes-snap/lsp/cwd/a.zig Save Del NOR /tmp/pardes-snap/lsp/cwd Del | 1 const std = @import("std"); @@ -121,7 +121,7 @@ | | | -== snap hover grid=120x40 cursor=10,4 +== snap hover grid=120x40 cursor=15,4 |Kill Newcol Tutor Debug NextColor Dump Find Grep Help | NOR /tmp/pardes-snap/lsp/cwd/a.zig Save Del NOR /tmp/pardes-snap/lsp/cwd Del | 1 const std = @import("std"); @@ -162,7 +162,7 @@ | NOR /tmp/pardes-snap/lsp/cwd/+Hover Del | 1 fn helper(x: u32) u32 | 2 (fn (u32) u32) -== snap symbols grid=120x40 cursor=10,4 +== snap symbols grid=120x40 cursor=15,4 |Kill Newcol Tutor Debug NextColor Dump Find Grep Help | NOR /tmp/pardes-snap/lsp/cwd/a.zig Save Del NOR /tmp/pardes-snap/lsp/cwd Del | 1 const std = @import("std"); @@ -197,13 +197,13 @@ | | | NOR /tmp/pardes-snap/lsp/cwd/+Search Del -| 1 /tmp/pardes-snap/lsp/cwd/a.zig:1:7 std -| 2 /tmp/pardes-snap/lsp/cwd/a.zig:3:4 helper fn helper( -| 3 /tmp/pardes-snap/lsp/cwd/a.zig:7:8 main fn main() vo +| 1 /tmp/pardes-snap/lsp/cwd/a.zig:1:7-9 std +| 2 /tmp/pardes-snap/lsp/cwd/a.zig:3:4-9 helper fn helpe +| 3 /tmp/pardes-snap/lsp/cwd/a.zig:7:8-11 main fn main() | NOR /tmp/pardes-snap/lsp/cwd/+Hover Del | 1 fn helper(x: u32) u32 | 2 (fn (u32) u32) -== snap step grid=120x40 cursor=13,2 +== snap step grid=120x40 cursor=15,2 |Kill Newcol Tutor Debug NextColor Dump Find Grep Help | NOR /tmp/pardes-snap/lsp/cwd/a.zig Save Del NOR /tmp/pardes-snap/lsp/cwd Del | 1 const std = @import("std"); @@ -238,9 +238,9 @@ | | | NOR /tmp/pardes-snap/lsp/cwd/+Search Del -| 1 /tmp/pardes-snap/lsp/cwd/a.zig:1:7 std -| 2 /tmp/pardes-snap/lsp/cwd/a.zig:3:4 helper fn helper( -| 3 /tmp/pardes-snap/lsp/cwd/a.zig:7:8 main fn main() vo +| 1 /tmp/pardes-snap/lsp/cwd/a.zig:1:7-9 std +| 2 /tmp/pardes-snap/lsp/cwd/a.zig:3:4-9 helper fn helpe +| 3 /tmp/pardes-snap/lsp/cwd/a.zig:7:8-11 main fn main() | NOR /tmp/pardes-snap/lsp/cwd/+Hover Del | 1 fn helper(x: u32) u32 | 2 (fn (u32) u32) @@ -279,9 +279,9 @@ | | | NOR /tmp/pardes-snap/lsp/cwd/+Search Del -| 1 /tmp/pardes-snap/lsp/cwd/a.zig:1:7 std -| 2 /tmp/pardes-snap/lsp/cwd/a.zig:3:4 helper fn helper( -| 3 /tmp/pardes-snap/lsp/cwd/a.zig:7:8 main fn main() vo +| 1 /tmp/pardes-snap/lsp/cwd/a.zig:1:7-9 std +| 2 /tmp/pardes-snap/lsp/cwd/a.zig:3:4-9 helper fn helpe +| 3 /tmp/pardes-snap/lsp/cwd/a.zig:7:8-11 main fn main() | NOR /tmp/pardes-snap/lsp/cwd/+Hover Del | 1 fn helper(x: u32) u32 | 2 (fn (u32) u32) -- cgit v1.3