fix(Metal): force a full rebuild in `setFontGrid`
This was causing garbled text due to a non-rebuilt rows referencing an outdated atlas when the DPI changed but not the grid dimensions, which could be caused by a variety of things such as the quick terminal slide-in, dpi scaling changes on sleep/wake, moving windows between displays because of closing/opening the laptop lid, etc.pull/6008/head
parent
dec14f3096
commit
16a61c43dd
|
|
@ -1019,6 +1019,10 @@ pub fn setFontGrid(self: *Metal, grid: *font.SharedGrid) void {
|
|||
// out a better way to handle this.
|
||||
log.err("error resizing cells buffer err={}", .{err});
|
||||
};
|
||||
|
||||
// Reset our viewport to force a rebuild, since `setScreenSize` only
|
||||
// does this when the number of cells changes, which isn't guaranteed.
|
||||
self.cells_viewport = null;
|
||||
}
|
||||
|
||||
/// Update the frame data.
|
||||
|
|
|
|||
Loading…
Reference in New Issue