diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 03:39:43 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | 84d23aef86c0bcb6ee14bb69b1e4d6d65205e2f6 (patch) | |
| tree | f45ab1d07c16ceec51d8c164ad210aa220efe484 /src/pardes.zig | |
| parent | 98e94b86a7c38e2bf4d66e57144fc9329906bb3b (diff) | |
| download | pardes-84d23aef86c0bcb6ee14bb69b1e4d6d65205e2f6.tar.gz pardes-84d23aef86c0bcb6ee14bb69b1e4d6d65205e2f6.zip | |
size says its limits, keeps every pane its rows, and ptys follow their panes
size refused an out-of-range line without saying the range, took a size
too small for the panes (leaving bodies of no rows), and a terminal
squeezed to its tag kept a pty of its old size. The refusal now names
20x6 to 4096x4096 (a bare size is EINVAL like any malformed line), a size
that would leave any pane less than its tag and 2 rows is refused and
undone, and a terminal's pty is resized with its pane down to one row
(only a folded or unplaced one keeps its grid).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/pardes.zig')
| -rw-r--r-- | src/pardes.zig | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pardes.zig b/src/pardes.zig index 72fd4d46..c103b9d7 100644 --- a/src/pardes.zig +++ b/src/pardes.zig @@ -6527,7 +6527,10 @@ pub const Pardes = struct { } else pane.tag_top = 0; const cols = @max(1, r.w -| config.GUTTER); const rows = @max(1, r.h -| pane.tag_rows); // the tag steals the top rows - if ((cols != pane.cols or rows != pane.rows) and r.h > pane.tag_rows) { + // A terminal's pty follows its pane down to a row, whatever the + // resize; only a folded one keeps the size it had, and one not + // placed yet the grid it was made with. + if ((cols != pane.cols or rows != pane.rows) and (r.h > pane.tag_rows or (pane.isTerminal() and !pane.collapsed and r.h > 0))) { // doc panes have no pty/emulator grid to reflow; just record // the size so bodyText renders the right number of rows if (pane.isTerminal()) { |
