aef498a53386 — Josef 'Jeff' Sipek a month ago
hlog: clear unused recent list lines

Otherwise stale information may remain on the screen.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
1 files changed, 4 insertions(+), 0 deletions(-)

M hlog/common/recent.c
M hlog/common/recent.c +4 -0
@@ 98,6 98,10 @@ void recent_refresh(struct recent *r)
 		qso_line_fmt(qso, r->lines[i]->str, r->ncols);
 	}
 
+	/* clear the remaining lines */
+	for (; i < r->nrows; i++)
+		memset(r->lines[i]->str, ' ', r->ncols);
+
 	/* print cached text */
 	for (i = 0; i < r->nrows; i++)
 		mvwprintw(r->win, i, 0, "%-*s", r->ncols, r->lines[i]->str);