From 0ef86a17988cac1e09cea2d0b5d80a21e81d7a2e Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Sat, 1 Aug 2026 12:08:34 -0300 Subject: a right click walks the hits, and a click inside a selection takes it whole; search/range look steps, goldens updated --- test/snapshots/look-center.golden | 4 +- test/snapshots/psearch.golden | 2 +- test/snapshots/rsearch.golden | 159 +++++++++++++++++++++++++++++++++++++- test/snapshots/rsearch.snap | 37 +++++++++ 4 files changed, 197 insertions(+), 5 deletions(-) (limited to 'test') diff --git a/test/snapshots/look-center.golden b/test/snapshots/look-center.golden index 1b2780ce..17d20d8d 100644 --- a/test/snapshots/look-center.golden +++ b/test/snapshots/look-center.golden @@ -29,7 +29,7 @@ | 111 line 111 | 112 line 112 | 113 line 113 -== snap center-dedup grid=150x30 cursor=7,16 +== snap center-dedup grid=150x30 cursor=17,14 |Kill Newcol Tutor Debug NextColor Dump Find Grep Help | /tmp/pardes-snap/look-center/cwd/big.txt Save De /tmp/pardes-snap/look-center/cwd Del /tmp/pardes-snap/look-center/cwd Del | 86 line 86 @@ -60,7 +60,7 @@ | 111 line 111 | 112 line 112 | 113 line 113 -== snap center-clamp grid=150x30 cursor=7,16 +== snap center-clamp grid=150x30 cursor=29,14 |Kill Newcol Tutor Debug NextColor Dump Find Grep Help | /tmp/pardes-snap/look-center/cwd/big.txt Save De /tmp/pardes-snap/look-center/cwd Del /tmp/pardes-snap/look-center/cwd Del | 86 line 86 diff --git a/test/snapshots/psearch.golden b/test/snapshots/psearch.golden index 7a5af17a..bda7af05 100644 --- a/test/snapshots/psearch.golden +++ b/test/snapshots/psearch.golden @@ -277,7 +277,7 @@ | 1 @p0:2:3-6 x MARK a | 2 @p0:4:3-6 x MARK b | 3 @p0:6:3-6 x MARK c -== snap rightsearch grid=140x30 cursor=7,3 +== snap rightsearch grid=140x30 cursor=7,5 |Kill Newcol Tutor Debug NextColor Dump Find Grep Help | /tmp/pardes-snap/psearch/cwd Del | diff --git a/test/snapshots/rsearch.golden b/test/snapshots/rsearch.golden index a7a4b506..d96744ee 100644 --- a/test/snapshots/rsearch.golden +++ b/test/snapshots/rsearch.golden @@ -29,7 +29,7 @@ | | | -== snap search grid=180x30 cursor=7,2 +== snap search grid=180x30 cursor=13,4 |Kill Newcol Tutor Debug NextColor Dump Find Grep Help | /tmp/pardes-snap/rsearch/cwd/code.txt Save Del /tmp/pardes-snap/rsearch/cwd Del /tmp/pardes-snap/rsearch/cwd Del | 1 run count_x now @@ -60,7 +60,7 @@ | /tmp/pardes-snap/rsearch/cwd/+Search Del | 1 code.txt:1:5-11 run count_x now | 2 code.txt:3:1-7 count_x again -== snap select grid=180x30 cursor=7,2 +== snap select grid=180x30 cursor=14,5 |Kill Newcol Tutor Debug NextColor Dump Find Grep Help | /tmp/pardes-snap/rsearch/cwd/code.txt Save Del /tmp/pardes-snap/rsearch/cwd Del /tmp/pardes-snap/rsearch/cwd Del | 1 run count_x now @@ -122,3 +122,158 @@ | /tmp/pardes-snap/rsearch/cwd/+Search Del | 1 code.txt:1:5-11 run count_x now | 2 code.txt:3:1-7 count_x again +== snap step1 grid=180x30 cursor=13,4 +|Kill Newcol Tutor Debug NextColor Dump Find Grep Help +| /tmp/pardes-snap/rsearch/cwd/code.txt Save Del /tmp/pardes-snap/rsearch/cwd Del /tmp/pardes-snap/rsearch/cwd Del +| 1 run count_x now +| 2 open sub/dep.txt:3 here code.txt sub code.txt sub +| 3 count_x again +| 4 pick two words +| +| code.txt +| +| +| /tmp/pardes-snap/rsearch/cwd/+Search Del +| 1 code.txt:1:5-11 run count_x now +| 2 code.txt:3:1-7 count_x again +| /tmp/pardes-snap/rsearch/cwd/sub/dep.txt Save Del +| 1 d1 +| 2 d2 +| 3 DEPTARGET /tmp/pardes-snap/rsearch/cwd Del +| 4 d4 +| 5 d5 code.txt sub +| 6 d6 +| +| +| +| +| +| /tmp/pardes-snap/rsearch/cwd/+Search Del +| 1 code.txt:4:1-8 pick two words +| /tmp/pardes-snap/rsearch/cwd/+Search Del +| 1 code.txt:1:5-11 run count_x now +| 2 code.txt:3:1-7 count_x again +== snap step2 grid=180x30 cursor=17,2 +|Kill Newcol Tutor Debug NextColor Dump Find Grep Help +| /tmp/pardes-snap/rsearch/cwd/code.txt Save Del /tmp/pardes-snap/rsearch/cwd Del /tmp/pardes-snap/rsearch/cwd Del +| 1 run count_x now +| 2 open sub/dep.txt:3 here code.txt sub code.txt sub +| 3 count_x again +| 4 pick two words +| +| code.txt +| +| +| /tmp/pardes-snap/rsearch/cwd/+Search Del +| 1 code.txt:1:5-11 run count_x now +| 2 code.txt:3:1-7 count_x again +| /tmp/pardes-snap/rsearch/cwd/sub/dep.txt Save Del +| 1 d1 +| 2 d2 +| 3 DEPTARGET /tmp/pardes-snap/rsearch/cwd Del +| 4 d4 +| 5 d5 code.txt sub +| 6 d6 +| +| +| +| +| +| /tmp/pardes-snap/rsearch/cwd/+Search Del +| 1 code.txt:4:1-8 pick two words +| /tmp/pardes-snap/rsearch/cwd/+Search Del +| 1 code.txt:1:5-11 run count_x now +| 2 code.txt:3:1-7 count_x again +== snap step3 grid=180x30 cursor=17,2 +|Kill Newcol Tutor Debug NextColor Dump Find Grep Help +| /tmp/pardes-snap/rsearch/cwd/code.txt Save Del /tmp/pardes-snap/rsearch/cwd Del /tmp/pardes-snap/rsearch/cwd Del +| 1 run count_x now +| 2 open sub/dep.txt:3 here code.txt sub code.txt sub +| 3 count_x again +| 4 pick two words +| +| code.txt +| +| +| /tmp/pardes-snap/rsearch/cwd/+Search Del +| 1 code.txt:1:5-11 run count_x now +| 2 code.txt:3:1-7 count_x again +| /tmp/pardes-snap/rsearch/cwd/sub/dep.txt Save Del +| 1 d1 +| 2 d2 +| 3 DEPTARGET /tmp/pardes-snap/rsearch/cwd Del +| 4 d4 +| 5 d5 code.txt sub +| 6 d6 +| +| +| +| +| +| /tmp/pardes-snap/rsearch/cwd/+Search Del +| 1 code.txt:4:1-8 pick two words +| /tmp/pardes-snap/rsearch/cwd/+Search Del +| 1 code.txt:1:5-11 run count_x now +| 2 code.txt:3:1-7 count_x again +== snap selclick grid=180x30 cursor=14,5 +|Kill Newcol Tutor Debug NextColor Dump Find Grep Help +| /tmp/pardes-snap/rsearch/cwd/code.txt Save Del /tmp/pardes-snap/rsearch/cwd Del /tmp/pardes-snap/rsearch/cwd Del +| 1 run count_x now +| 2 open sub/dep.txt:3 here code.txt sub code.txt sub +| 3 count_x again +| 4 pick two words +| +| code.txt +| /tmp/pardes-snap/rsearch/cwd/+Search Del +| 1 code.txt:4:1-8 pick two words +| /tmp/pardes-snap/rsearch/cwd/+Search Del +| 1 code.txt:1:5-11 run count_x now +| 2 code.txt:3:1-7 count_x again +| /tmp/pardes-snap/rsearch/cwd/sub/dep.txt Save Del +| 1 d1 +| 2 d2 +| 3 DEPTARGET /tmp/pardes-snap/rsearch/cwd Del +| 4 d4 +| 5 d5 code.txt sub +| 6 d6 +| +| +| +| +| +| /tmp/pardes-snap/rsearch/cwd/+Search Del +| 1 code.txt:4:1-8 pick two words +| /tmp/pardes-snap/rsearch/cwd/+Search Del +| 1 code.txt:1:5-11 run count_x now +| 2 code.txt:3:1-7 count_x again +== snap outside grid=180x30 cursor=20,5 +|Kill Newcol Tutor Debug NextColor Dump Find Grep Help +| /tmp/pardes-snap/rsearch/cwd/code.txt Save Del /tmp/pardes-snap/rsearch/cwd Del /tmp/pardes-snap/rsearch/cwd Del +| 1 run count_x now +| 2 open sub/dep.txt:3 here code.txt sub code.txt sub +| 3 count_x again +|╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ +| /tmp/pardes-snap/rsearch/cwd/+Search Del +| 1 code.txt:4:10-14 pick two words code.txt +| /tmp/pardes-snap/rsearch/cwd/+Search Del +| 1 code.txt:4:1-8 pick two words +| /tmp/pardes-snap/rsearch/cwd/+Search Del +| 1 code.txt:1:5-11 run count_x now +| 2 code.txt:3:1-7 count_x again +| /tmp/pardes-snap/rsearch/cwd/sub/dep.txt Save Del +| 1 d1 +| 2 d2 +| 3 DEPTARGET /tmp/pardes-snap/rsearch/cwd Del +| 4 d4 +| 5 d5 code.txt sub +| 6 d6 +| +| +| +| +| +| /tmp/pardes-snap/rsearch/cwd/+Search Del +| 1 code.txt:4:1-8 pick two words +| /tmp/pardes-snap/rsearch/cwd/+Search Del +| 1 code.txt:1:5-11 run count_x now +| 2 code.txt:3:1-7 count_x again diff --git a/test/snapshots/rsearch.snap b/test/snapshots/rsearch.snap index a6dcd167..542680c0 100644 --- a/test/snapshots/rsearch.snap +++ b/test/snapshots/rsearch.snap @@ -47,3 +47,40 @@ release right 18 4 wait 10000 DEPTARGET stable 700 15000 snap path-open +# A click does not merely LIST the hits, it goes to one: this re-search of +# `count_x` (line 1, col 15) also STEPS onto hit 1, so the cursor lands in the +# match — line 1 col 5, not the column that was clicked. +press right 15 3 +release right 15 3 +stable 700 15000 +snap step1 +# ...and the same word clicked in its OTHER place (line 3, col 10) opens NO +# second +Search: the list is already armed on this pattern, so the click is +# `n`. Cursor moves to hit 2, line 3. +press right 10 5 +release right 10 5 +stable 700 15000 +snap step2 +# past the last hit the ring wraps: back to hit 1, line 1. +press right 10 5 +release right 10 5 +stable 700 15000 +snap step3 +# A LEFT sweep over `pick two` (line 4, cols 8..15) and then a right CLICK +# INSIDE it: the click takes the whole selection — the search is for the +# two-word span (`4:1-8`), which the file-ish word expansion could never +# produce from the single word under the click. +press left 8 6 +drag left 15 6 +release left 15 6 +stable 400 5000 +press right 11 6 +release right 11 6 +stable 700 15000 +snap selclick +# ...and a right click OUTSIDE the selection is the ordinary word click again: +# `words` (line 4, col 19), not the span left lying in the pane. +press right 19 6 +release right 19 6 +stable 700 15000 +snap outside -- cgit v1.3