diff --git a/tty-draw.c b/tty-draw.c index 06d520e11..ee2a7198f 100644 --- a/tty-draw.c +++ b/tty-draw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty-draw.c,v 1.15 2026/07/26 09:02:08 nicm Exp $ */ +/* $OpenBSD: tty-draw.c,v 1.17 2026/09/22 06:49:47 nicm Exp $ */ /* * Copyright (c) 2026 Nicholas Marriott @@ -219,7 +219,12 @@ tty_draw_line(struct tty *tty, struct screen *s, u_int px, u_int py, u_int nx, } /* Did the previous line wrap on to this one? */ - if (py != 0 && atx == 0 && tty->cx >= tty->sx && nx == tty->sx) { + if (py != 0 && + atx == 0 && + tty->cx >= tty->sx && + tty->cy != UINT_MAX && + tty->cy + 1 == aty && + nx == tty->sx) { gl = grid_get_line(gd, gd->hsize + py - 1); if (gl->flags & GRID_LINE_WRAPPED) wrapped = 1;