From: Christian Heller Date: Mon, 29 Sep 2025 08:24:33 +0000 (+0200) Subject: Fix broken has_unread_highlight calculation. X-Git-Url: https://plomlompom.com/repos/?a=commitdiff_plain;h=06943e5f3464e2519c271b2ef3b965cbafed72cc;p=ircplom Fix broken has_unread_highlight calculation. --- 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: