From 3189900c13b98298776d0da8dcbcb4e0d88858cf Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 30 Sep 2026 19:16:56 -0300 Subject: Joincol is refused, as Newcol is, when the joined column cannot give each pane its tag and 2 rows Joincol moved every pane of the keyboard's column into the next one whether they fit or not. Two columns of two panes in a 12-row window became one column of four, wanting 12 rows where 10 were free, a layout that `size` then refused as it stood. Joincol now tries the join in place first (layout.joinFits: the panes and width moved, minimaFit asked, everything put back, nothing dropped or logged). A join that does not fit is refused, "Joincol: no space: the joined column cannot give each pane its tag and 2 rows". Co-Authored-By: Claude Opus 5.5 --- src/builtins.zig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/builtins.zig') diff --git a/src/builtins.zig b/src/builtins.zig index 6688d05f..27a1d36d 100644 --- a/src/builtins.zig +++ b/src/builtins.zig @@ -1271,6 +1271,9 @@ pub const Joincol = struct { // The keyboard's column joins the one to its right; the last has none. const col = c.p.keyboardColumn(c.p.active) orelse return; if (col + 1 >= c.p.ncol) return c.p.reportFailure(c.id, "Joincol: no column to the right"); + // As Newcol is refused: a column that could not give each pane its + // tag and 2 rows would leave a layout `size` refuses as it is. + if (!layout.joinFits(c.p, col)) return c.p.reportFailure(c.id, "Joincol: no space: the joined column cannot give each pane its tag and 2 rows"); layout.joinCol(c.p, col); } }; -- cgit v1.3