summaryrefslogtreecommitdiff
path: root/test/snapshots/ttyfollow.snap
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-07-07 22:01:58 -0300
committerGabriel Schneider <[email protected]>2026-08-01 15:02:07 -0300
commitaea460be8577be92b0910f1eb007fc99aab4ef30 (patch)
treee66c4d4aded304030720c86cbdce875232fb6b4b /test/snapshots/ttyfollow.snap
parent4612901858b229533c8e2ffc36db3da6bbadaa32 (diff)
downloadpardes-aea460be8577be92b0910f1eb007fc99aab4ef30.tar.gz
pardes-aea460be8577be92b0910f1eb007fc99aab4ef30.zip
shell panes follow new pty output only in tty mode: normal/insert hold the scrolled view even when the pane isn't active (the old gate only protected the active pane; tag edits use the remembered body mode). New ttyfollow.snap: background job streams into a scrolled-up normal-mode pane without moving it, tty mode follows again.
Diffstat (limited to 'test/snapshots/ttyfollow.snap')
-rw-r--r--test/snapshots/ttyfollow.snap47
1 files changed, 47 insertions, 0 deletions
diff --git a/test/snapshots/ttyfollow.snap b/test/snapshots/ttyfollow.snap
new file mode 100644
index 00000000..e7303b4b
--- /dev/null
+++ b/test/snapshots/ttyfollow.snap
@@ -0,0 +1,47 @@
+# follow-output gate: a shell pane in normal/insert mode holds its scrolled-up
+# view while new pty output streams in (before: only the ACTIVE pane held);
+# back in tty mode output follows to the bottom again. Pane A parks a
+# background job blocked on file `go`, pane B triggers it and syncs on `done1`.
+file s.txt x
+start 30 100 -n 3
+wait 8000 s.txt
+stable 700 20000
+key c-b
+stable 600 8000
+text (until test -f go; do sleep 0.05; done; seq 201 260; touch done1) &
+key enter
+stable 500 8000
+text seq 1 200
+key enter
+wait 8000 199
+stable 700 15000
+key c-b
+stable 600 8000
+wheel up 10 8
+wheel up 10 8
+wheel up 10 8
+stable 500 8000
+snap held-pre
+# focus pane B (right column), trigger A's job, sync on completion: A is now a
+# NON-active normal-mode pane receiving output — its view must not move
+press left 60 5
+release left 60 5
+stable 400 5000
+key c-b
+stable 600 8000
+text touch go; until test -f done1; do sleep 0.05; done; echo SYN''CED
+key enter
+wait 8000 SYNCED
+stable 700 15000
+snap held-post
+# back in A, re-enter tty: the echoed keystrokes pull the view to the bottom
+press left 10 8
+release left 10 8
+stable 400 5000
+key c-b
+stable 600 8000
+text seq 261 300
+key enter
+wait 8000 300
+stable 700 15000
+snap tty-follows