mirror of
https://github.com/wez/wezterm.git
synced 2024-11-14 03:16:09 +03:00
bounds check should be on the actual number of cols
Don't trust that a given Line has exactly phys_cols columns.
This commit is contained in:
parent
4a4d8c7186
commit
5dbf90412f
@ -217,7 +217,7 @@ impl<'a> TerminalWindow<'a> {
|
|||||||
// We infer this from the X position rather than enumerate the
|
// We infer this from the X position rather than enumerate the
|
||||||
// glyph_info iterator because glyphs may advance by multiple cells.
|
// glyph_info iterator because glyphs may advance by multiple cells.
|
||||||
let cell_idx = x as usize / cell_width;
|
let cell_idx = x as usize / cell_width;
|
||||||
if cell_idx > phys_cols {
|
if cell_idx >= line.cells.len() {
|
||||||
// Don't bother rendering outside the viewable area
|
// Don't bother rendering outside the viewable area
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user