summaryrefslogtreecommitdiff
path: root/src/pardes.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/pardes.zig')
-rw-r--r--src/pardes.zig5
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()) {