diff --git a/tty-draw.c b/tty-draw.c index d707d1bf3..c5d66a169 100644 --- a/tty-draw.c +++ b/tty-draw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty-draw.c,v 1.17 2026/09/22 06:49:47 nicm Exp $ */ +/* $OpenBSD: tty-draw.c,v 1.18 2026/10/12 15:28:45 nicm Exp $ */ /* * Copyright (c) 2026 Nicholas Marriott @@ -253,6 +253,10 @@ tty_draw_line(struct tty *tty, struct screen *s, u_int px, u_int py, u_int nx, /* Outside the area being drawn. */ empty = nx - i; gcp = &grid_default_cell; + + /* Flush the background before clearing. */ + if (empty != 0 && gcp->bg != last.bg) + empty = 0; } else { /* Get the current cell. */ grid_view_get_cell(gd, px + i, py, &gc);