summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-10-08 12:00:28 -0300
committerGabriel Schneider <[email protected]>2026-10-22 10:03:15 -0300
commit13d5613b77c62c425c3a124a34c0c2528cc6251f (patch)
treef3cbe41683ef31641ea087039db9fc3be81e141f /test
parent046979b877f02a91cf52cc86b84c5619cb9363d3 (diff)
downloadpardes-13d5613b77c62c425c3a124a34c0c2528cc6251f.tar.gz
pardes-13d5613b77c62c425c3a124a34c0c2528cc6251f.zip
Follow Helix search registers for n/N; keep Look navigation as named builtins
Diffstat (limited to 'test')
-rw-r--r--test/hxcases/cases.jsonl64
-rw-r--r--test/hxcases/goldens.jsonl64
-rw-r--r--test/hxcases/golf-waivers.jsonl7
-rw-r--r--test/output.zig65
-rw-r--r--test/snapshots/builtins.snap2
-rw-r--r--test/snapshots/find.snap10
-rw-r--r--test/snapshots/fsearch.snap8
-rw-r--r--test/snapshots/grep.snap8
-rw-r--r--test/snapshots/jumps.snap10
-rw-r--r--test/snapshots/lookrange.snap4
-rw-r--r--test/snapshots/lsp-client.snap4
-rw-r--r--test/snapshots/lsp.snap2
-rw-r--r--test/snapshots/lspcomplete.snap2
-rw-r--r--test/snapshots/lsprelpath.snap4
-rw-r--r--test/snapshots/psearch.snap6
-rw-r--r--test/snapshots/stepgrain.snap10
-rw-r--r--test/snapshots/themesel.snap42
-rw-r--r--test/snapshots/ttylook.snap12
18 files changed, 225 insertions, 99 deletions
diff --git a/test/hxcases/cases.jsonl b/test/hxcases/cases.jsonl
index f36afe11..b7fdc4c9 100644
--- a/test/hxcases/cases.jsonl
+++ b/test/hxcases/cases.jsonl
@@ -592,3 +592,67 @@
{"name": "comment-then-insert", "pane": "file", "text": "alpha\n", "keys": "<C-c>iz<esc>"}
{"name": "comment-after-sel-regex", "pane": "file", "text": "alpha\nbeta\ngamma\n", "keys": "%sa<ret><C-c>"}
{"name": "comment-after-split-regex", "pane": "file", "text": "a,b\nc,d\n", "keys": "%S,<ret><C-c>"}
+{"name": "search-repeat-next", "pane": "file", "text": "one one one\n", "keys": "w*n"}
+{"name": "search-repeat-next-tty", "pane": "tty", "text": "one one one\n", "keys": "w*n"}
+{"name": "search-repeat-prev", "pane": "file", "text": "one one one\n", "keys": "w*N"}
+{"name": "search-repeat-prev-tty", "pane": "tty", "text": "one one one\n", "keys": "w*N"}
+{"name": "search-repeat-wrap", "pane": "file", "text": "one one one\n", "keys": "w*3n"}
+{"name": "search-repeat-wrap-tty", "pane": "tty", "text": "one one one\n", "keys": "w*3n"}
+{"name": "search-repeat-count", "pane": "file", "text": "one one one\n", "keys": "w*2n"}
+{"name": "search-repeat-count-tty", "pane": "tty", "text": "one one one\n", "keys": "w*2n"}
+{"name": "search-repeat-reverse-count", "pane": "file", "text": "one one one\n", "keys": "w*2N"}
+{"name": "search-repeat-reverse-count-tty", "pane": "tty", "text": "one one one\n", "keys": "w*2N"}
+{"name": "search-repeat-select", "pane": "file", "text": "one one one\n", "keys": "w*vn"}
+{"name": "search-repeat-select-tty", "pane": "tty", "text": "one one one\n", "keys": "w*vn"}
+{"name": "search-repeat-select-count", "pane": "file", "text": "one one one\n", "keys": "w*v2n"}
+{"name": "search-repeat-select-count-tty", "pane": "tty", "text": "one one one\n", "keys": "w*v2n"}
+{"name": "search-repeat-select-back", "pane": "file", "text": "one one one\n", "keys": "w*vN"}
+{"name": "search-repeat-select-back-tty", "pane": "tty", "text": "one one one\n", "keys": "w*vN"}
+{"name": "search-repeat-keep-secondary", "pane": "file", "text": "one one one\n", "keys": "%sone<ret>n"}
+{"name": "search-repeat-keep-secondary-tty", "pane": "tty", "text": "one one one\n", "keys": "%sone<ret>n"}
+{"name": "search-repeat-reverse-selection", "pane": "file", "text": "one one one\n", "keys": "w*<A-;>n"}
+{"name": "search-repeat-reverse-selection-tty", "pane": "tty", "text": "one one one\n", "keys": "w*<A-;>n"}
+{"name": "search-repeat-smart-case", "pane": "file", "text": "one ONE one\n", "keys": "%sone<ret>,n"}
+{"name": "search-repeat-smart-case-tty", "pane": "tty", "text": "one ONE one\n", "keys": "%sone<ret>,n"}
+{"name": "search-repeat-upper-case", "pane": "file", "text": "one ONE ONE\n", "keys": "%sONE<ret>,n"}
+{"name": "search-repeat-upper-case-tty", "pane": "tty", "text": "one ONE ONE\n", "keys": "%sONE<ret>,n"}
+{"name": "search-repeat-named", "pane": "file", "text": "one one one\n", "keys": "w\"a*\"an"}
+{"name": "search-repeat-named-tty", "pane": "tty", "text": "one one one\n", "keys": "w\"a*\"an"}
+{"name": "search-repeat-remember-named", "pane": "file", "text": "one one one\n", "keys": "w\"a*n"}
+{"name": "search-repeat-remember-named-tty", "pane": "tty", "text": "one one one\n", "keys": "w\"a*n"}
+{"name": "search-repeat-literal", "pane": "file", "text": "a.b a.b axb\n", "keys": "3l<A-*>n"}
+{"name": "search-repeat-literal-tty", "pane": "tty", "text": "a.b a.b axb\n", "keys": "3l<A-*>n"}
+{"name": "search-repeat-newline", "pane": "file", "text": "alpha\nbeta\nalpha\nbeta\n", "keys": "%salpha<ret>,n"}
+{"name": "search-repeat-newline-tty", "pane": "tty", "text": "alpha\nbeta\nalpha\nbeta\n", "keys": "%salpha<ret>,n"}
+{"name": "search-repeat-no-reg", "pane": "file", "text": "one one one\n", "keys": "n"}
+{"name": "search-repeat-no-reg-tty", "pane": "tty", "text": "one one one\n", "keys": "n"}
+{"name": "search-repeat-missing", "pane": "file", "text": "one one one\n", "keys": "\"an"}
+{"name": "search-repeat-missing-tty", "pane": "tty", "text": "one one one\n", "keys": "\"an"}
+{"name": "search-repeat-regexp", "pane": "file", "text": "a1 a2 a3\n", "keys": "%sa[0-9]<ret>,n"}
+{"name": "search-repeat-regexp-tty", "pane": "tty", "text": "a1 a2 a3\n", "keys": "%sa[0-9]<ret>,n"}
+{"name": "search-repeat-zero", "pane": "file", "text": "abc abc\n", "keys": "%s$<ret>,n"}
+{"name": "search-repeat-zero-tty", "pane": "tty", "text": "abc abc\n", "keys": "%s$<ret>,n"}
+{"name": "search-repeat-unicode", "pane": "file", "text": "界 界 界\n", "keys": "w*n"}
+{"name": "search-repeat-unicode-tty", "pane": "tty", "text": "界 界 界\n", "keys": "w*n"}
+{"name": "search-repeat-combining", "pane": "file", "text": "á á á\n", "keys": "w*n"}
+{"name": "search-repeat-combining-tty", "pane": "tty", "text": "á á á\n", "keys": "w*n"}
+{"name": "search-repeat-word-boundary", "pane": "file", "text": "one oneself one\n", "keys": "e<A-*>n"}
+{"name": "search-repeat-word-boundary-tty", "pane": "tty", "text": "one oneself one\n", "keys": "e<A-*>n"}
+{"name": "search-repeat-word-normal", "pane": "file", "text": "one oneself one\n", "keys": "e*n"}
+{"name": "search-repeat-word-normal-tty", "pane": "tty", "text": "one oneself one\n", "keys": "e*n"}
+{"name": "search-repeat-word-extend-wrap", "pane": "file", "text": "one one one\n", "keys": "e*v4n"}
+{"name": "search-repeat-word-extend-wrap-tty", "pane": "tty", "text": "one one one\n", "keys": "e*v4n"}
+{"name": "search-repeat-word-reverse-wrap", "pane": "file", "text": "one one one\n", "keys": "e*4N"}
+{"name": "search-repeat-word-reverse-wrap-tty", "pane": "tty", "text": "one one one\n", "keys": "e*4N"}
+{"name": "search-repeat-unicode-boundary", "pane": "file", "text": "界 界界 界\n", "keys": "e*n"}
+{"name": "search-repeat-unicode-boundary-tty", "pane": "tty", "text": "界 界界 界\n", "keys": "e*n"}
+{"name": "search-repeat-unicode-alternatives", "pane": "file", "text": "界 語 界 語\n", "keys": "%s[界語]<ret>*n"}
+{"name": "search-repeat-unicode-alternatives-tty", "pane": "tty", "text": "界 語 界 語\n", "keys": "%s[界語]<ret>*n"}
+{"name": "search-repeat-multisel-extend", "pane": "file", "text": "one two one two\n", "keys": "%sone|two<ret>*vn"}
+{"name": "search-repeat-multisel-extend-tty", "pane": "tty", "text": "one two one two\n", "keys": "%sone|two<ret>*vn"}
+{"name": "search-repeat-backward-zero", "pane": "file", "text": "abc abc\n", "keys": "%s$<ret>,2N"}
+{"name": "search-repeat-backward-zero-tty", "pane": "tty", "text": "abc abc\n", "keys": "%s$<ret>,2N"}
+{"name": "search-repeat-adjacent", "pane": "file", "text": "aaa\n", "keys": "*2n"}
+{"name": "search-repeat-adjacent-tty", "pane": "tty", "text": "aaa\n", "keys": "*2n"}
+{"name": "search-repeat-direction-extend", "pane": "file", "text": "one one one\n", "keys": "e*<A-;>vn"}
+{"name": "search-repeat-direction-extend-tty", "pane": "tty", "text": "one one one\n", "keys": "e*<A-;>vn"}
diff --git a/test/hxcases/goldens.jsonl b/test/hxcases/goldens.jsonl
index 2dab15c0..bfa479be 100644
--- a/test/hxcases/goldens.jsonl
+++ b/test/hxcases/goldens.jsonl
@@ -592,3 +592,67 @@
{"name":"comment-then-insert","text":"# zalpha\n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":3}}
{"name":"comment-after-sel-regex","text":"# alpha\n# beta\n# gamma\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}},{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":6}},{"cursor":{"row":1,"col":5},"anchor":{"row":1,"col":5}},{"cursor":{"row":2,"col":3},"anchor":{"row":2,"col":3}},{"cursor":{"row":2,"col":6},"anchor":{"row":2,"col":6}}],"primary":0}
{"name":"comment-after-split-regex","text":"# a,b\n# c,d\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}},{"cursor":{"row":1,"col":2},"anchor":{"row":0,"col":4}},{"cursor":{"row":1,"col":5},"anchor":{"row":1,"col":4}}],"primary":0}
+{"name":"search-repeat-next","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-next-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-prev","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-prev-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-wrap","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-wrap-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-count","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}}
+{"name":"search-repeat-count-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}}
+{"name":"search-repeat-reverse-count","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}}
+{"name":"search-repeat-reverse-count-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}}
+{"name":"search-repeat-select","text":"one one one\n","mode":"select","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}],"primary":1}
+{"name":"search-repeat-select-tty","text":"one one one\n","mode":"select","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}],"primary":1}
+{"name":"search-repeat-select-count","text":"one one one\n","mode":"select","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}],"primary":0}
+{"name":"search-repeat-select-count-tty","text":"one one one\n","mode":"select","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0},"sels":[{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}],"primary":0}
+{"name":"search-repeat-select-back","text":"one one one\n","mode":"select","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}],"primary":1}
+{"name":"search-repeat-select-back-tty","text":"one one one\n","mode":"select","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}],"primary":1}
+{"name":"search-repeat-keep-secondary","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}}],"primary":0}
+{"name":"search-repeat-keep-secondary-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}}],"primary":0}
+{"name":"search-repeat-reverse-selection","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":7}}
+{"name":"search-repeat-reverse-selection-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":7}}
+{"name":"search-repeat-smart-case","text":"one ONE one\n","mode":"normal","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-smart-case-tty","text":"one ONE one\n","mode":"normal","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-upper-case","text":"one ONE ONE\n","mode":"normal","cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}}
+{"name":"search-repeat-upper-case-tty","text":"one ONE ONE\n","mode":"normal","cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}}
+{"name":"search-repeat-named","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-named-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-remember-named","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-remember-named-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-literal","text":"a.b a.b axb\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":7}}
+{"name":"search-repeat-literal-tty","text":"a.b a.b axb\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":7}}
+{"name":"search-repeat-newline","text":"alpha\nbeta\nalpha\nbeta\n","mode":"normal","cursor":{"row":2,"col":4},"anchor":{"row":2,"col":0}}
+{"name":"search-repeat-newline-tty","text":"alpha\nbeta\nalpha\nbeta\n","mode":"normal","cursor":{"row":2,"col":4},"anchor":{"row":2,"col":0}}
+{"name":"search-repeat-no-reg","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"search-repeat-no-reg-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"search-repeat-missing","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"search-repeat-missing-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"search-repeat-regexp","text":"a1 a2 a3\n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":3}}
+{"name":"search-repeat-regexp-tty","text":"a1 a2 a3\n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":3}}
+{"name":"search-repeat-zero","text":"abc abc\n","mode":"normal","cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0}}
+{"name":"search-repeat-zero-tty","text":"abc abc\n","mode":"normal","cursor":{"row":1,"col":0},"anchor":{"row":1,"col":0}}
+{"name":"search-repeat-unicode","text":"界 界 界\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-unicode-tty","text":"界 界 界\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-combining","text":"á á á\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-combining-tty","text":"á á á\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-word-boundary","text":"one oneself one\n","mode":"normal","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-word-boundary-tty","text":"one oneself one\n","mode":"normal","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}}
+{"name":"search-repeat-word-normal","text":"one oneself one\n","mode":"normal","cursor":{"row":0,"col":14},"anchor":{"row":0,"col":12}}
+{"name":"search-repeat-word-normal-tty","text":"one oneself one\n","mode":"normal","cursor":{"row":0,"col":14},"anchor":{"row":0,"col":12}}
+{"name":"search-repeat-word-extend-wrap","text":"one one one\n","mode":"select","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}}],"primary":1}
+{"name":"search-repeat-word-extend-wrap-tty","text":"one one one\n","mode":"select","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}}],"primary":1}
+{"name":"search-repeat-word-reverse-wrap","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}}
+{"name":"search-repeat-word-reverse-wrap-tty","text":"one one one\n","mode":"normal","cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}}
+{"name":"search-repeat-unicode-boundary","text":"界 界界 界\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":3}}
+{"name":"search-repeat-unicode-boundary-tty","text":"界 界界 界\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":3}}
+{"name":"search-repeat-unicode-alternatives","text":"界 語 界 語\n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":8},"anchor":{"row":0,"col":8}},{"cursor":{"row":0,"col":12},"anchor":{"row":0,"col":12}}],"primary":0}
+{"name":"search-repeat-unicode-alternatives-tty","text":"界 語 界 語\n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":8},"anchor":{"row":0,"col":8}},{"cursor":{"row":0,"col":12},"anchor":{"row":0,"col":12}}],"primary":0}
+{"name":"search-repeat-multisel-extend","text":"one two one two\n","mode":"select","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}},{"cursor":{"row":0,"col":14},"anchor":{"row":0,"col":12}}],"primary":1}
+{"name":"search-repeat-multisel-extend-tty","text":"one two one two\n","mode":"select","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":0}},{"cursor":{"row":0,"col":6},"anchor":{"row":0,"col":4}},{"cursor":{"row":0,"col":10},"anchor":{"row":0,"col":8}},{"cursor":{"row":0,"col":14},"anchor":{"row":0,"col":12}}],"primary":1}
+{"name":"search-repeat-backward-zero","text":"abc abc\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":7}}
+{"name":"search-repeat-backward-zero-tty","text":"abc abc\n","mode":"normal","cursor":{"row":0,"col":7},"anchor":{"row":0,"col":7}}
+{"name":"search-repeat-adjacent","text":"aaa\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"search-repeat-adjacent-tty","text":"aaa\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}
+{"name":"search-repeat-direction-extend","text":"one one one\n","mode":"select","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":6},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":2}},{"cursor":{"row":0,"col":4},"anchor":{"row":0,"col":6}}],"primary":1}
+{"name":"search-repeat-direction-extend-tty","text":"one one one\n","mode":"select","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":6},"sels":[{"cursor":{"row":0,"col":0},"anchor":{"row":0,"col":2}},{"cursor":{"row":0,"col":4},"anchor":{"row":0,"col":6}}],"primary":1}
diff --git a/test/hxcases/golf-waivers.jsonl b/test/hxcases/golf-waivers.jsonl
index eb1f824b..e69de29b 100644
--- a/test/hxcases/golf-waivers.jsonl
+++ b/test/hxcases/golf-waivers.jsonl
@@ -1,7 +0,0 @@
-{"name":"golf-reverse-golf-example-07","reason":"pardes n/N/* are the acme look ring, by decision: \"\"N, n and * do not walk the search register","reference":{"name":"golf-reverse-golf-example-07","text":"# snake_case to snake_case\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"select","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":11},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":11}},{"cursor":{"row":0,"col":16},"anchor":{"row":0,"col":25}}],"primary":0},"expected":{"name":"golf-reverse-golf-example-07","text":"# snake_case to snake_case\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"select","cursor":{"row":0,"col":16},"anchor":{"row":0,"col":25}}}
-{"name":"golf-reverse-golf-example-08","reason":"pardes n/N/* are the acme look ring, by decision: \"\"N, n and * do not walk the search register","reference":{"name":"golf-reverse-golf-example-08","text":"# snake_case to snake_case\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"select","cursor":{"row":2,"col":24},"anchor":{"row":2,"col":32},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":11}},{"cursor":{"row":0,"col":16},"anchor":{"row":0,"col":25}},{"cursor":{"row":2,"col":24},"anchor":{"row":2,"col":32}}],"primary":2},"expected":{"name":"golf-reverse-golf-example-08","text":"# snake_case to snake_case\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"select","cursor":{"row":0,"col":16},"anchor":{"row":0,"col":25}}}
-{"name":"golf-reverse-golf-example-09","reason":"pardes n/N/* are the acme look ring, by decision: \"\"N, n and * do not walk the search register","reference":{"name":"golf-reverse-golf-example-09","text":"# camelCase to snake_case\n\nRename all fields to be snake_case.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"select","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":10},"sels":[{"cursor":{"row":0,"col":2},"anchor":{"row":0,"col":10}},{"cursor":{"row":0,"col":15},"anchor":{"row":0,"col":24}},{"cursor":{"row":2,"col":24},"anchor":{"row":2,"col":33}}],"primary":0},"expected":{"name":"golf-reverse-golf-example-09","text":"# snake_case to snake_case\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"select","cursor":{"row":0,"col":16},"anchor":{"row":0,"col":25}}}
-{"name":"golf-reverse-golf-example-10","reason":"pardes n/N/* are the acme look ring, by decision: \"\"N, n and * do not walk the search register","reference":{"name":"golf-reverse-golf-example-10","text":"# camelCase to snake_case\n\nRename all fields to be snake_case.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"select","cursor":{"row":14,"col":3},"anchor":{"row":0,"col":0}},"expected":{"name":"golf-reverse-golf-example-10","text":"# snake_case to snake_case\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"select","cursor":{"row":14,"col":3},"anchor":{"row":0,"col":0}}}
-{"name":"golf-reverse-golf-example-11","reason":"pardes n/N/* are the acme look ring, by decision: \"\"N, n and * do not walk the search register","reference":{"name":"golf-reverse-golf-example-11","text":"# camelCase to snake_case\n\nRename all fields to be snake_case.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"select","cursor":{"row":6,"col":3},"anchor":{"row":6,"col":0},"sels":[{"cursor":{"row":6,"col":3},"anchor":{"row":6,"col":0}},{"cursor":{"row":12,"col":3},"anchor":{"row":12,"col":0}}],"primary":0},"expected":{"name":"golf-reverse-golf-example-11","text":"# snake_case to snake_case\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"select","cursor":{"row":6,"col":3},"anchor":{"row":6,"col":0},"sels":[{"cursor":{"row":6,"col":3},"anchor":{"row":6,"col":0}},{"cursor":{"row":12,"col":3},"anchor":{"row":12,"col":0}}],"primary":0}}
-{"name":"golf-reverse-golf-example-12","reason":"pardes n/N/* are the acme look ring, by decision: \"\"N, n and * do not walk the search register","reference":{"name":"golf-reverse-golf-example-12","text":"# camelCase to snake_case\n\nRename all fields to be snake_case.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"select","cursor":{"row":7,"col":41},"anchor":{"row":6,"col":0},"sels":[{"cursor":{"row":7,"col":41},"anchor":{"row":6,"col":0}},{"cursor":{"row":13,"col":39},"anchor":{"row":12,"col":0}}],"primary":0},"expected":{"name":"golf-reverse-golf-example-12","text":"# snake_case to snake_case\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n\n## After\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n","mode":"select","cursor":{"row":7,"col":41},"anchor":{"row":6,"col":0},"sels":[{"cursor":{"row":7,"col":41},"anchor":{"row":6,"col":0}},{"cursor":{"row":13,"col":39},"anchor":{"row":12,"col":0}}],"primary":0}}
-{"name":"golf-reverse-golf-example","reason":"pardes n/N/* are the acme look ring, by decision: \"\"N, n and * do not walk the search register","reference":{"name":"golf-reverse-golf-example","text":"# camelCase to snake_case\n\nRename all fields to be snake_case.\n\n## Before\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n\n## After\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n","mode":"select","cursor":{"row":13,"col":41},"anchor":{"row":12,"col":0},"sels":[{"cursor":{"row":7,"col":39},"anchor":{"row":6,"col":0}},{"cursor":{"row":13,"col":41},"anchor":{"row":12,"col":0}}],"primary":1},"expected":{"name":"golf-reverse-golf-example","text":"# snake_case to snake_case\n\nRename all fields to be camelCase.\n\n## Before\n\n```js\nconst userProfile = {firstName: \"John\"};\n```\n\n## After\n\n```js\nconst user_profile = {first_name: \"John\"};\n```\n","mode":"select","cursor":{"row":13,"col":41},"anchor":{"row":12,"col":0},"sels":[{"cursor":{"row":7,"col":39},"anchor":{"row":6,"col":0}},{"cursor":{"row":13,"col":41},"anchor":{"row":12,"col":0}}],"primary":1}}
diff --git a/test/output.zig b/test/output.zig
index 51d620c0..6ea6f6fa 100644
--- a/test/output.zig
+++ b/test/output.zig
@@ -219,11 +219,11 @@ test "reference Look selects the next sorted row from the captured request and k
try std.testing.expectEqual(results.serial, p.look_walk_owner.?);
try std.testing.expectEqual(@as(i32, 3), results.look_at.?.row);
const available = p.freeSlot();
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
try std.testing.expectEqual(rid, p.active);
try std.testing.expectEqual(@as(i32, 4), results.body.cur_row);
try std.testing.expectEqual(available, p.freeSlot());
- p.update(.{ .key = .{ .cp = 'N' } });
+ lookKey(p, 'N');
try std.testing.expectEqual(@as(i32, 3), results.body.cur_row);
p.active = 0;
@@ -791,7 +791,7 @@ fn selectedOutputText(pane: *const pardes.Pane) ?[]const u8 {
return line[lo..@min(line.len, hi + 1)];
}
-test "n/N in ordinary text skips comment slashes and retains real paths" {
+test "LookNext/LookPrev in ordinary text skips comment slashes and retains real paths" {
if (platform == .web) return error.SkipZigTest;
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 100, .rows = 20 });
defer p.deinit();
@@ -808,7 +808,7 @@ test "n/N in ordinary text skips comment slashes and retains real paths" {
.{ .key = 'N', .row = 4, .text = "/tmp" },
.{ .key = 'N', .row = 3, .text = "/" },
}) |step| {
- p.update(.{ .key = .{ .cp = step.key } });
+ lookKey(p, step.key);
try std.testing.expectEqual(@as(usize, 0), p.active);
try std.testing.expectEqual(step.row, pane.body.cur_row);
try std.testing.expectEqualStrings(step.text, selectedOutputText(pane) orelse "");
@@ -816,7 +816,7 @@ test "n/N in ordinary text skips comment slashes and retains real paths" {
}
}
-test "n/N skips formatted context and selects comment match locations" {
+test "LookNext/LookPrev skips formatted context and selects comment match locations" {
if (!pardes.syntax.enabled) return error.SkipZigTest;
for ([_]panes.Output.Origin{ .search, .{ .query = .references } }) |origin| {
for ([_]bool{ false, true }) |tslocations| {
@@ -860,7 +860,7 @@ test "n/N skips formatted context and selects comment match locations" {
.{ .key = 'N', .match = 1 },
.{ .key = 'N', .match = 0 },
}) |step| {
- p.update(.{ .key = .{ .cp = step.key } });
+ lookKey(p, step.key);
try std.testing.expectEqual(id, p.active);
const row = matches[step.match];
try std.testing.expectEqual(@as(i32, @intCast(row)), result.body.cur_row);
@@ -876,9 +876,9 @@ test "n/N skips formatted context and selects comment match locations" {
// The dot came back on the match it was on (the first), so the
// walk goes on from there.
try std.testing.expectEqual(@as(i32, @intCast(matches[0])), restored_result.body.cur_row);
- restored.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(restored, 'n');
try std.testing.expectEqual(@as(i32, @intCast(matches[1])), restored_result.body.cur_row);
- restored.update(.{ .key = .{ .cp = 'N' } });
+ lookKey(restored, 'N');
try std.testing.expectEqual(@as(i32, @intCast(matches[0])), restored_result.body.cur_row);
const restored_file = &restored_result.file.?;
const last = modal.lineSlice(restored_file.content, matches[0]);
@@ -887,7 +887,7 @@ test "n/N skips formatted context and selects comment match locations" {
}
}
-test "n/N selects one output location per row and opens nothing" {
+test "LookNext/LookPrev selects one output location per row and opens nothing" {
if (platform == .web) return;
var cwd_buf: [4096]u8 = undefined;
var path_buf: [4096]u8 = undefined;
@@ -900,20 +900,20 @@ test "n/N selects one output location per row and opens nothing" {
const results = p.panes[rid].?;
const panes_before = p.freeSlot();
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
try std.testing.expectEqual(rid, p.active);
try std.testing.expectEqual(panes_before, p.freeSlot());
try std.testing.expect(results.body.vsel.active and results.body.vsel.explicit);
try std.testing.expectEqualStrings("build.zig:1:1", selectedOutputText(results) orelse "");
try std.testing.expectEqual(panes.Output.Grain.line, panes.Output.grain(results.file.?.output));
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
try std.testing.expectEqual(@as(i32, 1), results.body.cur_row);
try std.testing.expectEqualStrings("mise.toml", selectedOutputText(results) orelse "");
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
try std.testing.expectEqual(@as(i32, 3), results.body.cur_row); // row 2 is not look-able
try std.testing.expectEqualStrings("uucode_config.zig:7:1", selectedOutputText(results) orelse "");
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
try std.testing.expectEqual(@as(i32, 0), results.body.cur_row); // ring seam
p.update(.{ .key = .{ .cp = Key.enter } });
@@ -922,7 +922,7 @@ test "n/N selects one output location per row and opens nothing" {
try std.testing.expectEqual(panes.Output.Grain.word, panes.Output.grain(p.panes[p.active].?.file.?.output));
}
-test "n/N resumes the result output whose Look moved focus away" {
+test "LookNext/LookPrev resumes the result output whose Look moved focus away" {
if (platform == .web) return;
var tmp = std.testing.tmpDir(.{});
defer tmp.cleanup();
@@ -945,10 +945,10 @@ test "n/N resumes the result output whose Look moved focus away" {
try std.testing.expect(results.look_at != null);
try std.testing.expectEqual(results.serial, p.look_walk_owner orelse return error.MissingLookOwner);
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
try std.testing.expectEqual(rid, p.active);
try std.testing.expectEqual(first + 1, results.body.cur_row);
- p.update(.{ .key = .{ .cp = 'N' } });
+ lookKey(p, 'N');
try std.testing.expectEqual(first, results.body.cur_row);
// A later no-match answer has no position to resume and therefore cannot
@@ -965,7 +965,7 @@ test "n/N resumes the result output whose Look moved focus away" {
null,
);
try std.testing.expectEqual(owner, p.look_walk_owner.?);
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
try std.testing.expectEqual(rid, p.active);
try std.testing.expectEqual(first + 1, results.body.cur_row);
@@ -981,7 +981,7 @@ test "n/N resumes the result output whose Look moved focus away" {
try std.testing.expect(p.paneBySerial(owner) == null);
}
-test "N exactly reverses n across output panes and the ring seam" {
+test "LookPrev exactly reverses LookNext across output panes and the ring seam" {
if (platform == .web) return;
var cwd_buf: [4096]u8 = undefined;
var path_buf: [4096]u8 = undefined;
@@ -1002,17 +1002,17 @@ test "N exactly reverses n across output panes and the ring seam" {
return .{ .pane = pp.active, .row = pane.body.cur_row, .col = pane.body.cur_col };
}
}.at;
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
const base = here(p);
var trail: [12]Mark = undefined;
for (&trail) |*mark| {
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
mark.* = here(p);
}
var i = trail.len;
while (i > 0) {
i -= 1;
- p.update(.{ .key = .{ .cp = 'N' } });
+ lookKey(p, 'N');
const want = if (i == 0) base else trail[i - 1];
try std.testing.expectEqual(want, here(p));
}
@@ -1068,20 +1068,20 @@ test "Themes lists the ring in sections and skips headings in both directions" {
// Opening an imported theme's selector must still begin with the natives.
// Walk across the section break without selecting or executing a heading.
for (pardes.themes[0 .. brk + 1]) |theme| {
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
try std.testing.expectEqual(tid, p.active);
const selected = selectedOutputText(list) orelse return error.MissingThemeSection;
try std.testing.expectEqualStrings(theme.name, selected["Theme ".len..]);
try std.testing.expectEqual(original_theme, p.settings.theme);
}
- p.update(.{ .key = .{ .cp = 'N' } });
+ lookKey(p, 'N');
const previous = selectedOutputText(list) orelse return error.MissingThemeSection;
try std.testing.expectEqualStrings(pardes.themes[brk - 1].name, previous["Theme ".len..]);
p.update(.{ .key = .{ .cp = Key.tab } });
try std.testing.expectEqual(brk - 1, p.settings.theme);
}
-test "n/N selects command outputs by whole row" {
+test "LookNext/LookPrev selects command outputs by whole row" {
if (platform == .web) return;
var cwd_buf: [4096]u8 = undefined;
var path_buf: [4096]u8 = undefined;
@@ -1094,18 +1094,18 @@ test "n/N selects command outputs by whole row" {
const tid = p.panes[p.active].?.search_pane orelse return error.MissingThemeList;
const themes = p.panes[tid].?;
try std.testing.expect(panes.Output.fileTraits(themes.file.?.output).commands);
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
const row0 = std.mem.trimEnd(u8, modal.lineSlice(themes.file.?.content, 1), " \t\r");
try std.testing.expectEqualStrings(row0, selectedOutputText(themes) orelse "");
const theme_before = p.settings.theme;
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
p.update(.{ .key = .{ .cp = Key.tab } });
try std.testing.expect(p.settings.theme != theme_before);
try std.testing.expect(p.executeBuiltinLine(0, "Look build.zig"));
p.update(.tick);
try std.testing.expect(p.active != 0);
- p.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(p, 'n');
try std.testing.expectEqual(@as(usize, 0), p.active);
}
@@ -1661,7 +1661,7 @@ test "stacked search and LSP results retain source tint navigation and dump owne
pane.body.mode = .normal;
pardes.look.armLookWalk(p, id);
for ([_]struct { key: u21, match: usize }{ .{ .key = 'n', .match = 0 }, .{ .key = 'n', .match = 1 }, .{ .key = 'N', .match = 0 } }) |step| {
- p.update(.{ .key = .{ .cp = step.key } });
+ lookKey(p, step.key);
try std.testing.expectEqual(@as(i32, @intCast(matches[step.match])), pane.body.cur_row);
const row = file.location_rows[matches[step.match]];
const line = modal.lineSlice(file.content, matches[step.match]);
@@ -1686,9 +1686,9 @@ test "stacked search and LSP results retain source tint navigation and dump owne
// The dot came back on the match it was on; the walk goes on
// from it both ways, N wrapping to the last as it does live.
try std.testing.expectEqual(@as(i32, @intCast(matches[0])), restored.panes[id].?.body.cur_row);
- restored.update(.{ .key = .{ .cp = 'N' } });
+ lookKey(restored, 'N');
try std.testing.expectEqual(@as(i32, @intCast(matches[1])), restored.panes[id].?.body.cur_row);
- restored.update(.{ .key = .{ .cp = 'n' } });
+ lookKey(restored, 'n');
try std.testing.expectEqual(@as(i32, @intCast(matches[0])), restored.panes[id].?.body.cur_row);
try std.testing.expectEqualStrings(source_text, source.file.?.content);
}
@@ -1833,3 +1833,8 @@ test "location cache eviction retains early colors and honors disk and unsaved r
try std.testing.expectEqual(@intFromEnum(pardes.syntax.Syn.comment), try Color.valueColor(file));
try std.testing.expectEqualStrings(comment, source.file.?.content);
}
+
+fn lookKey(p: *Pardes, key: u21) void {
+ for ([_]u21{ ' ', 'j', if (key == 'N') 'p' else 'n' }) |cp|
+ p.update(.{ .key = .{ .cp = cp } });
+}
diff --git a/test/snapshots/builtins.snap b/test/snapshots/builtins.snap
index 849c83d3..8ae22a62 100644
--- a/test/snapshots/builtins.snap
+++ b/test/snapshots/builtins.snap
@@ -37,7 +37,7 @@ wait 10000 Theme
stable 700 15000
# n moves through look-able text; it must not execute command names.
-key n n n
+key space j n space j n space j n
wait 10000 Look enter, right-click
wait 10000 Exec tab, middle-click
key space w ?
diff --git a/test/snapshots/find.snap b/test/snapshots/find.snap
index 20a5e36f..b2e36973 100644
--- a/test/snapshots/find.snap
+++ b/test/snapshots/find.snap
@@ -41,25 +41,25 @@ stable 700 15000
snap results
# n SELECTS row 1 and Enter looks it — a path, so the file OPENS, under the
# list's text, and each file after it under the one before.
-key n
+key space j n
key enter
wait 10000 beta body
stable 700 15000
snap first
snapstyle first
-key n
+key space j n
key enter
wait 10000 gamma body
stable 700 15000
snap second
-key n
+key space j n
key enter
wait 10000 alpha body
stable 700 15000
snap third
# N walks back up one row; Enter looks it, and the file is already open, so
# the look just focuses it
-key N
+key space j p
key enter
stable 700 15000
snap back
@@ -92,7 +92,7 @@ stable 700 10000
# rather than one buffer's rows: with nothing look-able here it carries on
# into the list that DOES have some — the zqm one — and resumes it one row
# past where the N above left it. Nothing opens; only the selection moved.
-key n
+key space j n
stable 400 5000
snap nomatch
# ... and asking for `zqm` AGAIN re-arms the list it ALREADY filled instead of
diff --git a/test/snapshots/fsearch.snap b/test/snapshots/fsearch.snap
index b050f1db..431e7126 100644
--- a/test/snapshots/fsearch.snap
+++ b/test/snapshots/fsearch.snap
@@ -49,16 +49,16 @@ snap results
snapstyle results
# n/N walk on from there, one row of the list per press, Enter looking what
# the step selected
-key n
+key space j n
key enter
stable 700 15000
snap second
-key n
+key space j n
key enter
stable 700 15000
snap third
# N walks back up to result 2 (line 6), Enter looks it
-key N
+key space j p
key enter
stable 700 15000
snap back
@@ -75,6 +75,6 @@ key /
text zzqq
key enter
stable 700 10000
-key n
+key space j n
stable 400 5000
snap nomatch
diff --git a/test/snapshots/grep.snap b/test/snapshots/grep.snap
index 07777e67..b3ce2947 100644
--- a/test/snapshots/grep.snap
+++ b/test/snapshots/grep.snap
@@ -55,16 +55,16 @@ stable 700 15000
snap results
# n selects the first row and Enter looks it: absolute path, line 1, columns
# 7..12 (`TARGET`), and those six cells come up selected
-key n
+key space j n
key enter
stable 700 15000
snap first
# ...and stepping on into sub/b.txt, then looking it, opens the file nothing
# had open
-key n
+key space j n
key enter
stable 700 15000
-key n
+key space j n
key enter
wait 10000 TARGET inside sub
stable 700 15000
@@ -88,7 +88,7 @@ stable 400 5000
text zzqq
key enter
stable 700 10000
-key n
+key space j n
stable 400 5000
snap nomatch
# the acme chord: a builtin executed with a SELECTION held takes it as the
diff --git a/test/snapshots/jumps.snap b/test/snapshots/jumps.snap
index 9ba0139d..f8d69d2a 100644
--- a/test/snapshots/jumps.snap
+++ b/test/snapshots/jumps.snap
@@ -85,26 +85,26 @@ snap jumplist
# An `@pN` row moves focus like any other, which it did not use to: the STEP
# only selects now, and the look Enter runs goes to the pane by the same route
# a path takes.
-key n
+key space j n
key enter
stable 700 15000
snap step1-shell
snapstyle step1-shell
# on to row 2 — one press, the directory on row 1 is no longer a stop of its own
-key n
+key space j n
key enter
stable 700 15000
snap step2-file
# row 3 is the shell again, then row 4
-key n
+key space j n
stable 400 5000
-key n
+key space j n
key enter
stable 700 15000
snap step4-line100
# N is the exact inverse: one press back onto row 3's location, and Enter
# follows it to the shell
-key N
+key space j p
key enter
stable 700 15000
snap step-back
diff --git a/test/snapshots/lookrange.snap b/test/snapshots/lookrange.snap
index 50ef9ad3..eb1db60a 100644
--- a/test/snapshots/lookrange.snap
+++ b/test/snapshots/lookrange.snap
@@ -65,13 +65,13 @@ stable 700 15000
snap hit1
snapstyle hit1
# n selects the next row, and the Enter after it goes to that hit
-key n
+key space j n
key enter
stable 700 15000
snap hit2
snapstyle hit2
# N walks back onto the first hit; Enter looks it, still selected
-key N
+key space j p
key enter
stable 700 15000
snap back
diff --git a/test/snapshots/lsp-client.snap b/test/snapshots/lsp-client.snap
index 541e7c7f..db94525e 100644
--- a/test/snapshots/lsp-client.snap
+++ b/test/snapshots/lsp-client.snap
@@ -27,11 +27,11 @@ wait 10000 add(3, 4)
stable 700 15000
snap gr-list
# step from the selected middle row to the last hit, then return
-key n
+key space j n
key enter
stable 700 15000
snap gr-opened
-key N
+key space j p
key enter
stable 700 15000
snap gr-back
diff --git a/test/snapshots/lsp.snap b/test/snapshots/lsp.snap
index 97fcf7ed..123fad93 100644
--- a/test/snapshots/lsp.snap
+++ b/test/snapshots/lsp.snap
@@ -43,7 +43,7 @@ key l
key s
stable 700 15000
snap symbols
-key n
+key space j n
key enter
stable 700 15000
snap step
diff --git a/test/snapshots/lspcomplete.snap b/test/snapshots/lspcomplete.snap
index e25c6525..5c76aac8 100644
--- a/test/snapshots/lspcomplete.snap
+++ b/test/snapshots/lspcomplete.snap
@@ -93,7 +93,7 @@ settle 100
# jump the way a goto with one row does. The first step selects row 1, and the
# Enter after it looks that row and lands SELECTING `verdigris` on line 2 of
# a.zig.
-key n
+key space j n
key enter
stable 700 15000
snap step
diff --git a/test/snapshots/lsprelpath.snap b/test/snapshots/lsprelpath.snap
index 667c2fc8..a83abf46 100644
--- a/test/snapshots/lsprelpath.snap
+++ b/test/snapshots/lsprelpath.snap
@@ -46,7 +46,7 @@ key esc
settle 100
# An absolute row has to keep resolving — it is the spelling every row had
# before this, and the one every hit outside the tree still has.
-key n
+key space j n
key enter
stable 700 15000
snap abslook
@@ -65,7 +65,7 @@ stable 700 15000
snap subrow
key esc
settle 100
-key n
+key space j n
key enter
stable 700 15000
snap sublook
diff --git a/test/snapshots/psearch.snap b/test/snapshots/psearch.snap
index 6e463119..d55fe833 100644
--- a/test/snapshots/psearch.snap
+++ b/test/snapshots/psearch.snap
@@ -41,12 +41,12 @@ stable 700 15000
snap results
snapstyle results
# n walks on to the next row, Enter looks it
-key n
+key space j n
key enter
stable 700 15000
snap second
# N walks back one row, Enter looks it
-key N
+key space j p
key enter
stable 700 15000
snap back
@@ -58,7 +58,7 @@ key /
text zzqq
key enter
stable 700 10000
-key n
+key space j n
stable 400 5000
snap nomatch
# right-clicking a word that names no file is the same search (acme button 3),
diff --git a/test/snapshots/stepgrain.snap b/test/snapshots/stepgrain.snap
index 3c4d3e4c..0f555ff8 100644
--- a/test/snapshots/stepgrain.snap
+++ b/test/snapshots/stepgrain.snap
@@ -36,21 +36,21 @@ wait 10000 sub/b.txt:1:1
stable 700 15000
snap results
# one press, one row: the head of row 1...
-key n
+key space j n
stable 400 5000
snap step-row1
snapstyle step-row1
# ...the head of row 2, and NOT the `sub/b.txt` sitting in its matched text —
# the cursor column is the assertion
-key n
+key space j n
stable 400 5000
snap step-row2
snapstyle step-row2
# ...row 3, and then the ring comes round to row 1 again
-key n
+key space j n
stable 400 5000
snap step-row3
-key n
+key space j n
stable 400 5000
snap step-wrap
# Back into the file, so the Find below is asked from a pane that is not a
@@ -68,7 +68,7 @@ text words
key enter
wait 10000 two words.txt
stable 700 15000
-key n
+key space j n
stable 400 5000
snap blank-in-path
snapstyle blank-in-path
diff --git a/test/snapshots/themesel.snap b/test/snapshots/themesel.snap
index 1d61bf6a..4c4d2baa 100644
--- a/test/snapshots/themesel.snap
+++ b/test/snapshots/themesel.snap
@@ -31,53 +31,53 @@ snap list
# n selects row 1 whole and Tab runs it: `Theme orchard`, which is already the
# boot theme, so only the selection moves. That is the honest first step — an
# idempotent command has to be safe to run.
-key n
+key space j n
key tab
stable 700 15000
snap step-orchard
snapstyle step-orchard
# ...and now the theme really does change under the cursor, one row at a time
-key n
+key space j n
key tab
stable 700 15000
snap step-dusk
snapstyle step-dusk
# Selection alone can skip rows without previewing or applying their themes.
# Four steps reach atelier, the Acme homage; Tab then applies it.
-key n
-key n
-key n
-key n
+key space j n
+key space j n
+key space j n
+key space j n
key tab
stable 700 15000
snap step-atelier
snapstyle step-atelier
-key n
+key space j n
key tab
stable 700 15000
snap step-forge
snapstyle step-forge
-key n
+key space j n
key tab
stable 700 15000
snap step-lagoon
snapstyle step-lagoon
-key n
+key space j n
key tab
stable 700 15000
snap step-solarium
snapstyle step-solarium
-key n
+key space j n
key tab
stable 700 15000
snap step-spectrum
snapstyle step-spectrum
-key n
+key space j n
key tab
stable 700 15000
snap step-harvest
snapstyle step-harvest
-key n
+key space j n
key tab
stable 700 15000
snap step-clay
@@ -85,37 +85,37 @@ snapstyle step-clay
# The three native contrast variants precede acme, lapis and lapis_plain, and then the first
# ported family's section. Its heading
# and blank separator are not stops in the n/N command walk.
-key n
+key space j n
key tab
stable 700 15000
snap step-forge-black
snapstyle step-forge-black
-key n
+key space j n
key tab
stable 700 15000
snap step-forge-soft
snapstyle step-forge-soft
-key n
+key space j n
key tab
stable 700 15000
snap step-orchard-black
snapstyle step-orchard-black
-key n
+key space j n
key tab
stable 700 15000
snap step-acme
snapstyle step-acme
-key n
+key space j n
key tab
stable 700 15000
snap step-lapis
snapstyle step-lapis
-key n
+key space j n
key tab
stable 700 15000
snap step-lapis-plain
snapstyle step-lapis-plain
-key n
+key space j n
key tab
stable 700 15000
snap step-dark-plus
@@ -124,14 +124,14 @@ snapstyle step-dark-plus
# its blank line are skipped like the first. (The imported half, past the
# legacy section, is sorted by name, so the ring is the same everywhere
# whatever order the directory read handed the files over in.)
-key n
+key space j n
key tab
stable 700 15000
snap step-solarized-dark
snapstyle step-solarized-dark
# N walks back the same way — it is the exact inverse of n — and the Tab after
# it runs the row it lands on, so the theme rewinds too
-key N
+key space j p
key tab
stable 700 15000
snap step-back
diff --git a/test/snapshots/ttylook.snap b/test/snapshots/ttylook.snap
index 91401a64..62760ae6 100644
--- a/test/snapshots/ttylook.snap
+++ b/test/snapshots/ttylook.snap
@@ -17,16 +17,16 @@ wait 8000 big.txt
stable 700 20000
# first n: cursor sits at the shell prompt below the output — wrap lands on
# the ls row's first token, big.txt; nothing opens
-key n
+key space j n
stable 400 5000
snap tok1
snapstyle tok1
# same row, next token: plain.txt
-key n
+key space j n
stable 400 5000
snap tok2
# N steps back to big.txt
-key N
+key space j p
stable 400 5000
snap tokback
# insert-mode n still types (a run splice), no stepping; undo it
@@ -39,9 +39,9 @@ snap insert
key u
stable 400 5000
# resume the walk from big.txt's start: plain.txt, then sub
-key n
+key space j n
stable 400 5000
-key n
+key space j n
stable 400 5000
snap tok3
# Return looks the selected dir: a shell opens below in sub and ls's it
@@ -52,7 +52,7 @@ snap diropen
# spined on the panes that have LOOKED, so the step leaves this shell for the
# one it was looked out of. That pane's cursor is on its last token (`sub`),
# so the walk runs off the end and comes round to its first — big.txt.
-key n
+key space j n
stable 400 5000
snap noop
# back in the first pane, Enter with the cursor ON a token looks it (no