terminal: mark kitty images as dirty on resize

This commit is contained in:
Mitchell Hashimoto
2023-08-22 14:46:23 -07:00
parent 7ff76ca00d
commit 33c21c7339

View File

@ -2113,6 +2113,9 @@ pub fn resize(self: *Screen, rows: usize, cols: usize) !void {
// No resize necessary // No resize necessary
if (self.rows == rows) return; 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 // 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 // reflow in any way, so we do the quicker thing and do a resize
// without reflow checks. // without reflow checks.
@ -2120,6 +2123,9 @@ pub fn resize(self: *Screen, rows: usize, cols: usize) !void {
return; 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 // If our columns increased, we alloc space for the new column width
// and go through each row and reflow if necessary. // and go through each row and reflow if necessary.
if (cols > self.cols) { if (cols > self.cols) {