summaryrefslogtreecommitdiff
path: root/test/snapshots/grep.snap
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-07-31 11:42:18 -0300
committerGabriel Schneider <[email protected]>2026-08-01 15:02:08 -0300
commit911215846f1d5a9b2e37a00e74fb9266d4a0884a (patch)
tree31413ca3336cbbd1933d9dc3e24f09a3b8ef46b4 /test/snapshots/grep.snap
parent0b7a480bef38b209741c520e2478d178767a9e51 (diff)
downloadpardes-911215846f1d5a9b2e37a00e74fb9266d4a0884a.tar.gz
pardes-911215846f1d5a9b2e37a00e74fb9266d4a0884a.zip
a Look path can name a range, and search selects what it found
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.
Diffstat (limited to 'test/snapshots/grep.snap')
-rw-r--r--test/snapshots/grep.snap19
1 files changed, 14 insertions, 5 deletions
diff --git a/test/snapshots/grep.snap b/test/snapshots/grep.snap
index 12ff2c70..af05f2d8 100644
--- a/test/snapshots/grep.snap
+++ b/test/snapshots/grep.snap
@@ -2,7 +2,8 @@
# SAME tag input `/` and Find use, but the walk reads file CONTENTS under every
# pane's directory at once — minus any directory another pane's already
# contains, so a tree two panes sit in is searched ONCE and every hit appears
-# once. A row is `path:LINE:COL text` with the path RELATIVE to the directory
+# once. A row is `path:LINE:COL-ENDCOL text` — the match's whole span, so
+# looking it SELECTS the hit — with the path RELATIVE to the directory
# of the pane that asked — the same directory its results buffer is named in,
# so the short name resolves; only a hit from outside that tree stays absolute.
# n/N walk the rows like any other result list, and a row pointing into a file
@@ -43,7 +44,8 @@ key enter
wait 10000 sub/b.txt:2:1
stable 700 15000
snap results
-# n looks the first row: absolute path, line 1, column 7 (the `T`)
+# n looks the first row: absolute path, line 1, columns 7..12 (`TARGET`), and
+# those six cells come up selected
key n
stable 700 15000
snap first
@@ -54,9 +56,16 @@ key n
wait 10000 TARGET inside sub
stable 700 15000
snap opened-hit
-# a pattern nothing holds: an empty list of its own, n has nowhere to go
-press middle 45 1
-release middle 45 1
+# a pattern nothing holds: an empty list of its own, n has nowhere to go.
+# Armed from the LEADER, not the topbar word: the n above left the hit
+# SELECTED in a.txt (a ranged result row is one a look selects), and a topbar
+# execute chords whatever is selected into its argument — so a middle-click
+# here would run `Grep TARGET` and never ask for a pattern at all. The leader
+# path runs the builtin with no argument, which is what this step is about; the
+# chord itself is the last two snaps below.
+key space
+key f
+key g
stable 400 5000
text zzqq
key enter