diff options
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index cd247272..e08c2f37 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -4745,19 +4745,11 @@ pub const Pardes = struct { else "Newcol: no space for a column: this one is too narrow to split"); }; - // A narrower column wraps long tags onto more rows, which can leave - // a pane under its tag and two rows: it takes them back from the - // panes with rows to spare (a pane dragged short keeps its own), - // its column shared out again only where that is not enough, and - // where nothing holds every minimum there is no new column, as a - // size too small is refused. - layout.restoreMinimaFrom(p, &before, &before_min); - for (0..p.ncol) |k| if (layout.squeezed(p, k, &before, &before_min) and !layout.shareColumn(p, k)) { - layout.dropColumnUnannounced(p, c); + if (!layout.keepColumn(p, c, &before, &before_min)) { p.next_column_serial = unspent; layout.compute(p); return p.reportFailure(from_id, "Newcol: no space for a column: the panes' tags would not fit"); - }; + } // Kept: now it has a serial, and the log hears of it. layout.noteColumn(p, "newcol", layout.columnSerial(p, c)); tagline.enterHeader(p, c); |
