diff --git a/tty.c b/tty.c index 81c964b4..80d2c4c4 100644 --- a/tty.c +++ b/tty.c @@ -588,7 +588,8 @@ tty_draw_line(struct tty *tty, struct screen *s, u_int py, u_int ox, u_int oy) tty_reset(tty); tty_cursor(tty, ox + sx, oy + py); - if (screen_size_x(s) >= tty->sx && tty_term_has(tty->term, TTYC_EL)) + if (ox + sx + screen_size_x(s) >= tty->sx && + tty_term_has(tty->term, TTYC_EL)) tty_putcode(tty, TTYC_EL); else { for (i = sx; i < screen_size_x(s); i++)