From 06943e5f3464e2519c271b2ef3b965cbafed72cc Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 29 Sep 2025 10:24:33 +0200 Subject: [PATCH] Fix broken has_unread_highlight calculation. --- src/ircplom/tui_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ircplom/tui_base.py b/src/ircplom/tui_base.py index 4593bdc..46c3992 100644 --- a/src/ircplom/tui_base.py +++ b/src/ircplom/tui_base.py @@ -179,7 +179,7 @@ class _HistoryWidget(_ScrollableWidget): def has_unread_highlight(self) -> bool: 'Whether any of the unread lines are marked for highlighting.' return bool([line for line in self._history[-self.n_lines_unread:] - if line.startswith('*')]) + if self.n_lines_unread and line.startswith('*')]) @property def n_lines_unread(self) -> int: -- 2.30.2