From 33c21c733941fd7014eff1cf8437fbef5ad6cf4c Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Tue, 22 Aug 2023 14:46:23 -0700 Subject: [PATCH] terminal: mark kitty images as dirty on resize --- src/terminal/Screen.zig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/terminal/Screen.zig b/src/terminal/Screen.zig index 976ccb10d..0ae944a96 100644 --- a/src/terminal/Screen.zig +++ b/src/terminal/Screen.zig @@ -2113,6 +2113,9 @@ pub fn resize(self: *Screen, rows: usize, cols: usize) !void { // No resize necessary if (self.rows == rows) return; + // No matter what we mark our image state as dirty + self.kitty_images.dirty = true; + // If we have the same number of columns, text can't possibly // reflow in any way, so we do the quicker thing and do a resize // without reflow checks. @@ -2120,6 +2123,9 @@ pub fn resize(self: *Screen, rows: usize, cols: usize) !void { return; } + // No matter what we mark our image state as dirty + self.kitty_images.dirty = true; + // 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) {