From c0b68087aa5cc9a901c27179bd42eb6082b22e67 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Thu, 11 Feb 2021 18:32:54 -0500 Subject: [PATCH] Truncate bar if too long --- lightcards/display.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightcards/display.py b/lightcards/display.py index de3ffe0..06e8148 100644 --- a/lightcards/display.py +++ b/lightcards/display.py @@ -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), ) -- 2.39.2