From 04cd5a2b41efd6f39c3ba15c32e60843e2c6485d Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 6 Jul 2026 13:10:53 -0300 Subject: layout: every pane open/close resizes exactly ONE sibling — never the whole column. Buggy paths fixed: Alt-n inserted a weight-1 shell (whole column reflowed) — now splitBelow the active pane; stackDocLeft (file/image/tutor open with no doc yet) gave the doc a fair share (every pane shrank) — now it halves only the old top pane's slot; ttyForDir (execute from a file pane) appended a weight-1 shell to the rightmost column — now splitBelow its bottom pane; Alt-c moved a pane out without absorbVWeight (all old siblings grew) — now the sibling above absorbs first. Underneath: splitBelow/absorbVWeight/stackDocLeft snap the whole column's weights to on-screen row counts, because computeGeom's per-pane round(avail*w/vsum) let fractional weights jiggle bystanders by a row; evictLonePristineTty recomputes geometry first (a just-stacked doc has no rect). New snap tests layout-open + layout-close cover Alt-n, doc stacking, ttyForDir, Alt-c, tag Del, pty EOF, and column-width handoff. Six goldens regenerated (fileedit, images, look-file, syntax, tutor, windowops): they had frozen the fair-share/append reflow this change removes; every diff is only the doc/split pane sizing, with untouched panes' boundaries restored bit-identical (e.g. bottom pane tag back at its boot row 17 instead of pushed to 22). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/snapshots/layout-close.golden | 205 +++++++++++++++++++++++++++++++++++++ 1 file changed, 205 insertions(+) create mode 100644 test/snapshots/layout-close.golden (limited to 'test/snapshots/layout-close.golden') diff --git a/test/snapshots/layout-close.golden b/test/snapshots/layout-close.golden new file mode 100644 index 00000000..9557ec98 --- /dev/null +++ b/test/snapshots/layout-close.golden @@ -0,0 +1,205 @@ +== snap built grid=140x40 cursor=4,16 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/layout-close/cwd Del nm /tmp/pardes-snap/layout-close/cwd Del +| +| marker.txt marker.txt +| +| nm /tmp/pardes-snap/layout-close/cwd Del +| +| marker.txt +| +| nm /tmp/pardes-snap/layout-close/cwd Del +| +| marker.txt +| +| nm /tmp/pardes-snap/layout-close/cwd Del +| +| marker.txt +| +| +| +| +| +| nm /tmp/pardes-snap/layout-close/cwd Del +| +| marker.txt +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== snap altc grid=140x40 cursor=98,4 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/layout-close/cwd Del nm /tmp/pardes-snap/layout-close/cwd Del nm /tmp/pardes-snap/layout-close/cwd Del +| +| marker.txt marker.txt marker.txt +| +| nm /tmp/pardes-snap/layout-close/cwd Del +| +| marker.txt +| +| nm /tmp/pardes-snap/layout-close/cwd Del +| +| marker.txt +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/layout-close/cwd Del +| +| marker.txt +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== snap del grid=140x40 cursor=98,4 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/layout-close/cwd Del nm /tmp/pardes-snap/layout-close/cwd Del nm /tmp/pardes-snap/layout-close/cwd Del +| +| marker.txt marker.txt marker.txt +| +| +| +| +| +| nm /tmp/pardes-snap/layout-close/cwd Del +| +| marker.txt +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/layout-close/cwd Del +| +| marker.txt +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== snap exit grid=140x40 cursor=4,7 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/layout-close/cwd Del nm /tmp/pardes-snap/layout-close/cwd Del nm /tmp/pardes-snap/layout-close/cwd Del +| +| marker.txt marker.txt marker.txt +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/layout-close/cwd Del +| +| marker.txt +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +== snap colclose grid=140x40 cursor=4,7 +|Kill Newcol Tutor Debug Colors NextColor Dump +| nm /tmp/pardes-snap/layout-close/cwd Del nm /tmp/pardes-snap/layout-close/cwd Del +| +| marker.txt marker.txt +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| nm /tmp/pardes-snap/layout-close/cwd Del +| +| marker.txt +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| +| -- cgit v1.3