Subject: [PATCH] only show one blank-line unread indicator at a time

From: Asa <[email-masked]>
Date: Fri, 31 Oct 2025 21:34:35 -0400

---
 window.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

diff --git a/window.c b/window.c
index 2e79a65..eb26424 100644
--- a/window.c
+++ b/window.c
@@ -216,6 +216,8 @@ static void statusUpdate(void) {
 static size_t windowTop(const struct Window *window) {
 	size_t top = BufferCap - MAIN_LINES - window->scroll;
 	if (window->scroll) top += MarkerLines;
+	if (window->unreadHard > 0 && window->unreadHard < MAIN_LINES)
+		top++;
 	return top;
 }
 
@@ -255,6 +257,8 @@ static void mainUpdate(void) {
 	int y = 0;
 	int marker = MAIN_LINES - SplitLines - MarkerLines;
 	for (size_t i = windowTop(window); i < BufferCap; ++i) {
+		if (i == BufferCap - window->unreadHard)
+			mainAdd(y++, false, &(struct Line) {0, Warm, 0, ""});
 		mainAdd(y++, window->time, bufferHard(window->buffer, i));
 		if (window->scroll && y == marker) break;
 	}
@@ -361,17 +365,7 @@ bool windowWrite(uint id, enum Heat heat, const time_t *src, const char *str) {
 		if (!window->unreadSoft++) window->unreadHard = 0;
 	}
 	if (window->mark && heat > Cold) {
-		if (!window->unreadWarm++) {
-			int lines = bufferPush(
-				window->buffer, windowCols(window),
-				window->thresh, Warm, ts, ""
-			);
-			if (window->scroll) scrollN(window, lines);
-			if (window->unreadSoft > 1) {
-				window->unreadSoft++;
-				window->unreadHard += lines;
-			}
-		}
+		window->unreadWarm++;
 		if (heat > window->heat) window->heat = heat;
 		statusUpdate();
 	}
-- 
2.51.0