about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-09-07 22:21:41 -0400
committerJune McEnroe <june@causal.agency>2020-09-07 22:21:41 -0400
commitcf4259551503049a1ebb50cd7d9ceac172ec7c3b (patch)
treebd17940a9adf197acaec70cd3d651a476ff4ea01
parentCall uiWrite to insert blank lines (diff)
downloadtest-cf4259551503049a1ebb50cd7d9ceac172ec7c3b.tar.gz
test-cf4259551503049a1ebb50cd7d9ceac172ec7c3b.zip
Add blank line to unread if there are already unread
This fixes the inconsistent M-u behaviour when catgirl is restarting and
reconnecting to pounce, for example.
-rw-r--r--ui.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui.c b/ui.c
index 9499b23..25de2ce 100644
--- a/ui.c
+++ b/ui.c
@@ -568,6 +568,10 @@ void uiWrite(uint id, enum Heat heat, const time_t *src, const char *str) {
 		if (!window->unreadWarm++) {
 			int lines = bufferPush(window->buffer, COLS, false, Cold, ts, "");
 			if (window->scroll) windowScroll(window, lines);
+			if (window->unreadSoft > 1) {
+				window->unreadSoft++;
+				window->unreadHard += lines;
+			}
 		}
 		if (heat > window->heat) window->heat = heat;
 		statusUpdate();
2019-05-10Highlight yacc and lex files as CJune McEnroe Their %-prefixed directives should probably be highlighted Macro. 2019-05-10Use val instead of suboptargJune McEnroe suboptarg doesn't exist in GNU. Hopefully BSD getsubopt also sets val on failure? 2019-05-09Add Parable of the SowerJune McEnroe 2019-05-07Add bit without buildJune McEnroe Need to do some stuff in the Makefile for lex and yacc and generating HTML pages for it. 2019-05-04Fix MANDIR typoJune McEnroe 2019-05-04Move relay to binJune McEnroe