From feb846ddb9239cb905792458bf2ad5dbb22ba427 Mon Sep 17 00:00:00 2001 From: Derek Stevens Date: Thu, 7 Apr 2022 15:53:26 -0600 Subject: [PATCH] paint bg color when there isn't enough space in a window body for an entire line of text --- wind.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wind.c b/wind.c index fc562fa..b25d9a1 100644 --- a/wind.c +++ b/wind.c @@ -219,6 +219,7 @@ int winresize(Window* w, Rectangle r, int safe, int keepextra) { r1.min.y = y; if (!safe || !eqrect(w->body.all, r1)) { oy = y; + if (y + 1 + w->body.fr.font->height <= r.max.y) { /* room for one line */ r1.min.y = y; r1.max.y = y + 1; @@ -227,6 +228,7 @@ int winresize(Window* w, Rectangle r, int safe, int keepextra) { r1.min.y = min(y, r.max.y); r1.max.y = r.max.y; } else { + draw(screen, r1, textcols[BACK], nil, ZP); r1.min.y = y; r1.max.y = y; }