diff options
| author | Gabriel Schneider <[email protected]> | 2026-07-08 05:18:55 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-01 15:02:07 -0300 |
| commit | 2826704c7f829b5b5375ed2bf7414b455d3b0735 (patch) | |
| tree | 87d79168d297d1d599a81c82635580d073302111 /test | |
| parent | 4314f442048c6654b9179633539495836f7fae82 (diff) | |
| download | pardes-2826704c7f829b5b5375ed2bf7414b455d3b0735.tar.gz pardes-2826704c7f829b5b5375ed2bf7414b455d3b0735.zip | |
new panes reject a too-short split parent: if the chosen parent would leave the new pane under 2 body rows, splitParent swaps in a qualifying pane (same column first), else the tallest pane anywhere; applied to Alt-n, look-dir, placeDoc and ttyForDir. New splitparent.snap.
Diffstat (limited to 'test')
| -rw-r--r-- | test/snapshots/splitparent.golden | 99 | ||||
| -rw-r--r-- | test/snapshots/splitparent.snap | 27 |
2 files changed, 126 insertions, 0 deletions
diff --git a/test/snapshots/splitparent.golden b/test/snapshots/splitparent.golden new file mode 100644 index 00000000..b838cdad --- /dev/null +++ b/test/snapshots/splitparent.golden @@ -0,0 +1,99 @@ +== snap shrunk grid=100x30 cursor=4,3 +|Kill Newcol Tutor Debug Colors NextColor Dump +| NOR /tmp/pardes-snap/splitparent/cwd Del NOR /tmp/pardes-snap/splitparent/cwd Del +| NOR /tmp/pardes-snap/splitparent/cwd Del +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== snap swap-parent grid=100x30 cursor=4,7 +|Kill Newcol Tutor Debug Colors NextColor Dump +| NOR /tmp/pardes-snap/splitparent/cwd Del NOR /tmp/pardes-snap/splitparent/cwd Del +| NOR /tmp/pardes-snap/splitparent/cwd Del +| +| +| NOR /tmp/pardes-snap/splitparent/cwd Del +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== snap tallest grid=100x5 cursor=54,4 +|Kill Newcol Tutor Debug Colors NextColor Dump +| NOR /tmp/pardes-snap/splitparent/cwd Del NOR /tmp/pardes-snap/splitparent/cwd Del +| NOR /tmp/pardes-snap/splitparent/cwd Del +| NOR /tmp/pardes-snap/splitparent/cwd Del NOR /tmp/pardes-snap/splitparent/cwd Del +| +== snap regrown grid=100x30 cursor=54,18 +|Kill Newcol Tutor Debug Colors NextColor Dump +| NOR /tmp/pardes-snap/splitparent/cwd Del NOR /tmp/pardes-snap/splitparent/cwd Del +| NOR /tmp/pardes-snap/splitparent/cwd Del +| +| +| NOR /tmp/pardes-snap/splitparent/cwd Del +| +| +| +| +| +| +| +| +| +| +| NOR /tmp/pardes-snap/splitparent/cwd Del +| +| +| +| +| +| +| +| +| +| +| +| +| diff --git a/test/snapshots/splitparent.snap b/test/snapshots/splitparent.snap new file mode 100644 index 00000000..77a1fba1 --- /dev/null +++ b/test/snapshots/splitparent.snap @@ -0,0 +1,27 @@ +# a new pane never opens under a too-short parent: Alt-n from a tag-only pane +# splits the tall sibling in its column instead; when NO pane could leave the +# newcomer 2 body rows, the tallest one anywhere is split +start 30 100 -n 3 +stable 700 20000 +# shrink pane 0 (top-left) to just its tagline +press left 20 16 +drag left 20 2 +release left 20 2 +motion 40 25 +stable 500 8000 +snap shrunk +# Alt-n from the tag-only pane: the new shell opens below the tall sibling +# underneath it, not as another 1-row sliver +key a-n +stable 700 15000 +snap swap-parent +# squeeze the grid until no pane is 5 rows tall, then Alt-n again: the +# tallest pane (right column) is split even though the active one is left +resize 5 100 +stable 700 15000 +key a-n +stable 700 15000 +snap tallest +resize 30 100 +stable 700 15000 +snap regrown |
