home · contact · privacy
Fix broken has_unread_highlight calculation.
authorChristian Heller <c.heller@plomlompom.de>
Mon, 29 Sep 2025 08:24:33 +0000 (10:24 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Mon, 29 Sep 2025 08:24:33 +0000 (10:24 +0200)
src/ircplom/tui_base.py

index 4593bdce0e3caa7fd0dccede054b565b4a35ba01..46c3992d88bbfadb0b6f4c8a0270c1d2baed6cf1 100644 (file)
@@ -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: