diff --git a/src/xwin.rs b/src/xwin.rs index 194bc415b..10d9e8717 100644 --- a/src/xwin.rs +++ b/src/xwin.rs @@ -217,7 +217,7 @@ impl<'a> TerminalWindow<'a> { // We infer this from the X position rather than enumerate the // glyph_info iterator because glyphs may advance by multiple cells. 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 break; }