summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-07-08 04:44:56 -0300
committerGabriel Schneider <[email protected]>2026-08-01 15:02:07 -0300
commit4314f442048c6654b9179633539495836f7fae82 (patch)
tree4007db76673d19f4e18bc83838e02f630b867f98 /test
parentb6b899b40a339441694ab7443b00967da8f0b100 (diff)
downloadpardes-4314f442048c6654b9179633539495836f7fae82.tar.gz
pardes-4314f442048c6654b9179633539495836f7fae82.zip
panes can shrink to just their tagline: border-drag clamps drop from MINH to BOX_H (the tag row doubles as the re-enlarge handle; the gutter move box wins over the handle so a tag-only pane stays movable), a hidden body's pty/vt is never resized so re-enlarging restores it intact, and cursor/modal-selection paints never land on the tag row. New shrinktag.snap; tutor updated.
Diffstat (limited to 'test')
-rw-r--r--test/snapshots/shrinktag.golden155
-rw-r--r--test/snapshots/shrinktag.snap49
2 files changed, 204 insertions, 0 deletions
diff --git a/test/snapshots/shrinktag.golden b/test/snapshots/shrinktag.golden
new file mode 100644
index 00000000..83379db7
--- /dev/null
+++ b/test/snapshots/shrinktag.golden
@@ -0,0 +1,155 @@
+== snap before grid=100x30 cursor=4,7
+|Kill Newcol Tutor Debug Colors NextColor Dump
+| NOR /tmp/pardes-snap/shrinktag/cwd Del NOR /tmp/pardes-snap/shrinktag/cwd Del
+|
+| w.txt w.txt
+|
+|
+|
+| echo one; echo two
+|
+|
+|
+|
+|
+|
+|
+|
+| NOR /tmp/pardes-snap/shrinktag/cwd Del
+|
+| w.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+== snap shrunk grid=100x30 cursor=4,7
+|Kill Newcol Tutor Debug Colors NextColor Dump
+| NOR /tmp/pardes-snap/shrinktag/cwd Del NOR /tmp/pardes-snap/shrinktag/cwd Del
+| NOR /tmp/pardes-snap/shrinktag/cwd Del
+| w.txt
+| w.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+== snap move-preview grid=100x30 cursor=4,7
+|Kill Newcol Tutor Debug Colors NextColor Dump
+| NOR /tmp/pardes-snap/shrinktag/cwd Del NOR /tmp/pardes-snap/shrinktag/cwd Del
+| NOR /tmp/pardes-snap/shrinktag/cwd Del
+| w.txt
+| w.txt
+|
+|
+| ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌▌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+== snap restored grid=100x30 cursor=4,7
+|Kill Newcol Tutor Debug Colors NextColor Dump
+| NOR /tmp/pardes-snap/shrinktag/cwd Del NOR /tmp/pardes-snap/shrinktag/cwd Del
+|
+| w.txt w.txt
+|
+|
+|
+| echo one; echo two
+|
+|
+|
+|
+|
+|
+|
+|
+| NOR /tmp/pardes-snap/shrinktag/cwd Del
+|
+| w.txt
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+== snap bottom-shrunk grid=100x30 cursor=4,7
+|Kill Newcol Tutor Debug Colors NextColor Dump
+| NOR /tmp/pardes-snap/shrinktag/cwd Del NOR /tmp/pardes-snap/shrinktag/cwd Del
+|
+| w.txt w.txt
+|
+|
+|
+| echo one; echo two
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+|
+| NOR /tmp/pardes-snap/shrinktag/cwd Del
diff --git a/test/snapshots/shrinktag.snap b/test/snapshots/shrinktag.snap
new file mode 100644
index 00000000..d82f8192
--- /dev/null
+++ b/test/snapshots/shrinktag.snap
@@ -0,0 +1,49 @@
+# a pane can shrink to just its tagline: border-drag the handle to the tag row
+# (0 body rows), the gutter box still grabs a move, and dragging back down
+# restores the body intact (the hidden pane's pty/vt is never resized)
+file w.txt x
+start 30 100 -n 3
+wait 8000 w.txt
+stable 700 20000
+# content in pane 0 so the restored body is provably intact
+press left 5 8
+release left 5 8
+stable 400 5000
+key i
+text echo one; echo two
+key enter
+key esc
+settle 700
+stable 400 5000
+snap before
+# drag pane 0's bottom handle (its last row) up to its tag row: tag-only pane
+press left 20 16
+drag left 20 2
+release left 20 2
+motion 40 25
+stable 500 8000
+snap shrunk
+# the shrunk pane's single row is now the pair's resize handle, but the gutter
+# box must still win: grab it, preview a move into the right column, abort by
+# releasing over the pane itself
+press left 1 2
+drag left 70 8
+stable 400 5000
+snap move-preview
+drag left 20 2
+release left 20 2
+stable 400 5000
+# re-enlarge: the tag row doubles as the drag handle, pull it back down
+press left 20 2
+drag left 20 16
+release left 20 16
+motion 40 25
+stable 500 8000
+snap restored
+# the bottom pane can shrink to ITS tag too: drag past the bottom, clamp holds
+press left 20 16
+drag left 20 30
+release left 20 30
+motion 40 25
+stable 500 8000
+snap bottom-shrunk