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/fsearch.golden | 58 +++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'test/snapshots/fsearch.golden') diff --git a/test/snapshots/fsearch.golden b/test/snapshots/fsearch.golden index 02176d84..d89cd743 100644 --- a/test/snapshots/fsearch.golden +++ b/test/snapshots/fsearch.golden @@ -88,10 +88,10 @@ | | | NOR /tmp/pardes-snap/fsearch/cwd/+Search Del -| 1 g.txt:2:1 MARK a -| 2 g.txt:6:1 MARK b -| 3 g.txt:10:1 MARK c -== snap first grid=180x30 cursor=7,3 +| 1 g.txt:2:1-4 MARK a +| 2 g.txt:6:1-4 MARK b +| 3 g.txt:10:1-4 MARK c +== snap first grid=180x30 cursor=10,3 |Kill Newcol Tutor Debug NextColor Dump Find Grep Help | NOR /tmp/pardes-snap/fsearch/cwd/g.txt Save Del NOR /tmp/pardes-snap/fsearch/cwd Del NOR /tmp/pardes-snap/fsearch/cwd Del | 1 l1 @@ -119,14 +119,14 @@ | | | NOR /tmp/pardes-snap/fsearch/cwd/+Search Del -| 1 g.txt:2:1 MARK a -| 2 g.txt:6:1 MARK b -| 3 g.txt:10:1 MARK c +| 1 g.txt:2:1-4 MARK a +| 2 g.txt:6:1-4 MARK b +| 3 g.txt:10:1-4 MARK c == style first |0: 0-52 #949494,#121212, 53-179 d,#121212, |1: 0-1 d,#626262, 2-48 #949494,#121212, 49-59 d,#121212, 60-61 d,#262626, 62-97 #949494,#121212, 98-119 d,#121212, 120-121 d,#262626, 122-157 #949494,#121212, 158-179 d,#121212, |2: 0-1 d,#444444, 2-6 #626262,#080808, 7-8 #bdbdbd,#080808, 9-59 d,#080808, 60-61 d,#444444, 62-119 #bdbdbd,#080808, 120-121 d,#444444, 122-179 #bdbdbd,#080808, -|3: 0-1 d,#444444, 2-6 #949494,#121212, 7-12 #bdbdbd,#080808, 13-59 d,#080808, 60-61 d,#444444, 62-119 #bdbdbd,#080808, 120-121 d,#444444, 122-179 #bdbdbd,#080808, +|3: 0-1 d,#444444, 2-6 #949494,#121212, 7-10 #d8c8a8,#4a3a1e, 11-12 #bdbdbd,#080808, 13-59 d,#080808, 60-61 d,#444444, 62-119 #bdbdbd,#080808, 120-121 d,#444444, 122-179 #bdbdbd,#080808, |4: 0-1 d,#444444, 2-6 #626262,#080808, 7-8 #bdbdbd,#080808, 9-59 d,#080808, 60-61 d,#444444, 62-119 #bdbdbd,#080808, 120-121 d,#444444, 122-179 #bdbdbd,#080808, |5: 0-1 d,#444444, 2-6 #626262,#080808, 7-8 #bdbdbd,#080808, 9-59 d,#080808, 60-61 d,#444444, 62-119 #bdbdbd,#080808, 120-121 d,#444444, 122-179 #bdbdbd,#080808, |6: 0-1 d,#444444, 2-6 #626262,#080808, 7-8 #bdbdbd,#080808, 9-59 d,#080808, 60-61 d,#444444, 62-119 #bdbdbd,#080808, 120-121 d,#444444, 122-179 #bdbdbd,#080808, @@ -151,9 +151,9 @@ |25: 0-1 d,#444444, 2-6 #626262,#080808, 7-59 d,#080808, 60-61 d,#444444, 62-119 #bdbdbd,#080808, 120-121 d,#444444, 122-179 #bdbdbd,#080808, |26: 0-1 d,#262626, 2-45 #949494,#121212, 46-59 d,#121212, 60-61 d,#444444, 62-119 #bdbdbd,#080808, 120-121 d,#444444, 122-179 #bdbdbd,#080808, |27: 0-1 d,#444444, 2-6 #626262,#080808, 7-59 #d8c8a8,#4a3a1e, 60-61 d,#444444, 62-119 #bdbdbd,#080808, 120-121 d,#444444, 122-179 #bdbdbd,#080808, -|28: 0-1 d,#444444, 2-6 #626262,#080808, 7-22 #bdbdbd,#080808, 23-59 d,#080808, 60-61 d,#444444, 62-119 #bdbdbd,#080808, 120-121 d,#444444, 122-179 #bdbdbd,#080808, -|29: 0-1 d,#121212, 2-6 #626262,#080808, 7-23 #bdbdbd,#080808, 24-59 d,#080808, 60-61 d,#444444, 62-119 #bdbdbd,#080808, 120-121 d,#444444, 122-179 #bdbdbd,#080808, -== snap second grid=180x30 cursor=7,7 +|28: 0-1 d,#444444, 2-6 #626262,#080808, 7-24 #bdbdbd,#080808, 25-59 d,#080808, 60-61 d,#444444, 62-119 #bdbdbd,#080808, 120-121 d,#444444, 122-179 #bdbdbd,#080808, +|29: 0-1 d,#121212, 2-6 #626262,#080808, 7-25 #bdbdbd,#080808, 26-59 d,#080808, 60-61 d,#444444, 62-119 #bdbdbd,#080808, 120-121 d,#444444, 122-179 #bdbdbd,#080808, +== snap second grid=180x30 cursor=10,7 |Kill Newcol Tutor Debug NextColor Dump Find Grep Help | NOR /tmp/pardes-snap/fsearch/cwd/g.txt Save Del NOR /tmp/pardes-snap/fsearch/cwd Del NOR /tmp/pardes-snap/fsearch/cwd Del | 1 l1 @@ -181,10 +181,10 @@ | | | NOR /tmp/pardes-snap/fsearch/cwd/+Search Del -| 1 g.txt:2:1 MARK a -| 2 g.txt:6:1 MARK b -| 3 g.txt:10:1 MARK c -== snap third grid=180x30 cursor=7,11 +| 1 g.txt:2:1-4 MARK a +| 2 g.txt:6:1-4 MARK b +| 3 g.txt:10:1-4 MARK c +== snap third grid=180x30 cursor=10,11 |Kill Newcol Tutor Debug NextColor Dump Find Grep Help | NOR /tmp/pardes-snap/fsearch/cwd/g.txt Save Del NOR /tmp/pardes-snap/fsearch/cwd Del NOR /tmp/pardes-snap/fsearch/cwd Del | 1 l1 @@ -212,10 +212,10 @@ | | | NOR /tmp/pardes-snap/fsearch/cwd/+Search Del -| 2 g.txt:6:1 MARK b -| 3 g.txt:10:1 MARK c +| 2 g.txt:6:1-4 MARK b +| 3 g.txt:10:1-4 MARK c | 4 -== snap back grid=180x30 cursor=7,7 +== snap back grid=180x30 cursor=10,7 |Kill Newcol Tutor Debug NextColor Dump Find Grep Help | NOR /tmp/pardes-snap/fsearch/cwd/g.txt Save Del NOR /tmp/pardes-snap/fsearch/cwd Del NOR /tmp/pardes-snap/fsearch/cwd Del | 1 l1 @@ -243,10 +243,10 @@ | | | NOR /tmp/pardes-snap/fsearch/cwd/+Search Del -| 1 g.txt:2:1 MARK a -| 2 g.txt:6:1 MARK b -| 3 g.txt:10:1 MARK c -== snap cancel grid=180x30 cursor=7,7 +| 1 g.txt:2:1-4 MARK a +| 2 g.txt:6:1-4 MARK b +| 3 g.txt:10:1-4 MARK c +== snap cancel grid=180x30 cursor=10,7 |Kill Newcol Tutor Debug NextColor Dump Find Grep Help | NOR /tmp/pardes-snap/fsearch/cwd/g.txt Save Del NOR /tmp/pardes-snap/fsearch/cwd Del NOR /tmp/pardes-snap/fsearch/cwd Del | 1 l1 @@ -274,10 +274,10 @@ | | | NOR /tmp/pardes-snap/fsearch/cwd/+Search Del -| 1 g.txt:2:1 MARK a -| 2 g.txt:6:1 MARK b -| 3 g.txt:10:1 MARK c -== snap nomatch grid=180x30 cursor=7,7 +| 1 g.txt:2:1-4 MARK a +| 2 g.txt:6:1-4 MARK b +| 3 g.txt:10:1-4 MARK c +== snap nomatch grid=180x30 cursor=10,7 |Kill Newcol Tutor Debug NextColor Dump Find Grep Help | NOR /tmp/pardes-snap/fsearch/cwd/g.txt Save Del NOR /tmp/pardes-snap/fsearch/cwd Del NOR /tmp/pardes-snap/fsearch/cwd Del | 1 l1 @@ -305,6 +305,6 @@ | NOR /tmp/pardes-snap/fsearch/cwd/+Search Del | 1 | NOR /tmp/pardes-snap/fsearch/cwd/+Search Del -| 1 g.txt:2:1 MARK a -| 2 g.txt:6:1 MARK b -| 3 g.txt:10:1 MARK c +| 1 g.txt:2:1-4 MARK a +| 2 g.txt:6:1-4 MARK b +| 3 g.txt:10:1-4 MARK c -- cgit v1.3