]> git.armaanb.net Git - lightcards.git/blobdiff - lightcards/display.py
Truncate bar if too long
[lightcards.git] / lightcards / display.py
index de3ffe0a6aaa2769cd5a35335f4897efa7aefd9d..06e8148833254b30e58a810b86f04bd5547e8bed 100644 (file)
@@ -276,7 +276,7 @@ class Display:
         self.win.addstr(
             mlines - 1,
             len(bar_start + bar_middle),
-            bar_end,
+            textwrap.shorten(bar_end, width=mcols - 20, placeholder="…"),
             curses.color_pair(1),
         )