From f417659368a761d3b1bb139b9d53612b793c03b9 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 3 Sep 2022 22:33:20 -0700 Subject: [PATCH] on resize, if rows increasing, handle that first --- src/terminal/Screen.zig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/terminal/Screen.zig b/src/terminal/Screen.zig index 2535edaf7..b1d32d582 100644 --- a/src/terminal/Screen.zig +++ b/src/terminal/Screen.zig @@ -923,6 +923,9 @@ pub fn resize(self: *Screen, rows: usize, cols: usize) !void { return; } + // We grow rows first so we can make space for more reflow + if (rows > self.rows) try self.resizeWithoutReflow(rows, cols); + // If our columns increased, we alloc space for the new column width // and go through each row and reflow if necessary. if (cols > self.cols) {