summaryrefslogtreecommitdiff
path: root/test/snapshots/ttylook.snap
diff options
context:
space:
mode:
Diffstat (limited to 'test/snapshots/ttylook.snap')
-rw-r--r--test/snapshots/ttylook.snap91
1 files changed, 36 insertions, 55 deletions
diff --git a/test/snapshots/ttylook.snap b/test/snapshots/ttylook.snap
index 0779d3f0..f22cd0d1 100644
--- a/test/snapshots/ttylook.snap
+++ b/test/snapshots/ttylook.snap
@@ -1,51 +1,31 @@
-# tty n/N look-motion (normal mode only): n selects the next output row of
-# the terminal whose leading file-ish word looks somewhere (file, path:NNN —
-# resolved by the look machinery, prompt/echo rows blanked via the OSC 133
-# marks) and looks it; plain rows are skipped; N steps back up. Insert-mode
-# n still types (run splice); with nothing lookable n is a no-op.
+# tty n/N token motion (normal mode only): n/N SELECT the next/prev
+# whitespace-separated token that look resolves — several per line, so the
+# greet ls row hops big.txt -> plain.txt -> sub — moving the cursor to the
+# token start and opening NOTHING. Return looks the selection (dir -> shell
+# +ls there, file -> pane) and navigation continues in what opened. The first
+# n wraps from the prompt row to the first token; insert-mode n still types;
+# with nothing lookable n is a no-op.
lines big.txt 40
file plain.txt just text
dirmk sub
start 30 120 -n 3
wait 8000 big.txt
stable 700 20000
-# real shell output mixing lookable and plain rows (two short printfs so the
-# echoes never wrap; echo rows are prompt-marked and invisible to the walk)
-key c-b
-stable 600 8000
-text printf 'zz\nbig.txt:20\nww\n'
-key enter
-text printf 'plain.txt\nbig.txt:33\nzz\n'
-key enter
-text echo DO''NE
-key enter
-wait 8000 DONE
-stable 700 15000
-key c-b
-stable 600 8000
-# from the top: n skips nothing-rows, lands on the ls row (big.txt ...) first
-key g g
-stable 400 5000
-key n
-stable 700 15000
-snap lsrow
-snapstyle lsrow
-# next hits: big.txt:20 (file pane scrolls there), plain.txt, big.txt:33
+# 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
-stable 700 15000
-snap line20
-key n
-stable 700 15000
-snap plain
+stable 400 5000
+snap tok1
+snapstyle tok1
+# same row, next token: plain.txt
key n
-stable 700 15000
-snap line33
-# N walks back up to the plain.txt row
+stable 400 5000
+snap tok2
+# N steps back to big.txt
key N
-stable 700 15000
-snap back
-snapstyle back
-# insert mode: n types (a run splice), it does not step
+stable 400 5000
+snap tokback
+# insert-mode n still types (a run splice), no stepping; undo it
key i
text nn
key esc
@@ -54,24 +34,25 @@ stable 400 5000
snap insert
key u
stable 400 5000
-# a shell with nothing lookable: cd into the empty subdir (the old ls row no
-# longer resolves from there), print plain rows — n has nowhere to go
-key a-n
-stable 700 15000
-key c-b
-stable 600 8000
-text cd sub
-key enter
-text printf 'qq\nrr\n'
-key enter
-text echo O''VER
+# resume the walk from big.txt's start: plain.txt, then sub
+key n
+stable 400 5000
+key n
+stable 400 5000
+snap tok3
+# Return looks the selected dir: a shell opens below in sub and ls's it
key enter
-wait 8000 OVER
stable 700 15000
-key c-b
-stable 600 8000
-key g g
-stable 400 5000
+snap diropen
+# the fresh pane's dir is empty: n has nothing lookable, stays put
key n
stable 400 5000
snap noop
+# back in the first pane, Enter with the cursor ON a token looks it (no
+# selection: the cursor word expands) — big.txt opens as a file pane
+press left 4 4
+release left 4 4
+stable 400 5000
+key enter
+stable 700 15000
+snap fileopen