summaryrefslogtreecommitdiff
path: root/test/snapshots/ttylook.snap
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-07-06 17:36:07 -0300
committerGabriel Schneider <[email protected]>2026-08-01 15:02:07 -0300
commitffa636a284b3ccc9aa4f31dff7f148780d2cd00b (patch)
treeaba9014d031f4f2b63c55fd06167c1398f7085d9 /test/snapshots/ttylook.snap
parent65bffe2c7b7fcdbd82cc112315e64e1bca8dd150 (diff)
downloadpardes-ffa636a284b3ccc9aa4f31dff7f148780d2cd00b.tar.gz
pardes-ffa636a284b3ccc9aa4f31dff7f148780d2cd00b.zip
tty look motion: n/N on a terminal pane (normal mode only) walk the pane's own output rows — paneCursorLines, prompt/echo rows already blanked by the OSC 133 marks — for the next/prev row whose leading file-ish word resolves through look.resolve (realpath-only, side-effect-free; only the chosen row gets the real look), msel-select it, scroll it into view, and look it via actOnSelection. The modal cursor is the position (no new Pane state), so the walk resumes wherever j/k left it; focus returns to the terminal after the look so n keeps stepping; no wrap; no hit = no-op. Insert mode still splices, tty mode still forwards to the pty. The file-pane search stepper stays separate (different row predicate: the searched file's path prefix vs general resolvability). New snap script ttylook.snap + golden; all 19 baseline goldens untouched and green (20/20).
Diffstat (limited to 'test/snapshots/ttylook.snap')
-rw-r--r--test/snapshots/ttylook.snap77
1 files changed, 77 insertions, 0 deletions
diff --git a/test/snapshots/ttylook.snap b/test/snapshots/ttylook.snap
new file mode 100644
index 00000000..648dcd42
--- /dev/null
+++ b/test/snapshots/ttylook.snap
@@ -0,0 +1,77 @@
+# 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.
+lines big.txt 40
+file plain.txt just text
+dirmk sub
+start 30 120
+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
+key n
+stable 700 15000
+snap line20
+key n
+stable 700 15000
+snap plain
+key n
+stable 700 15000
+snap line33
+# N walks back up to the plain.txt row
+key N
+stable 700 15000
+snap back
+snapstyle back
+# insert mode: n types (a run splice), it does not step
+key i
+text nn
+key esc
+settle 700
+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
+key enter
+wait 8000 OVER
+stable 700 15000
+key c-b
+stable 600 8000
+key g g
+stable 400 5000
+key n
+stable 400 5000
+snap noop