From b35875e300e6938a33080df87119bc22af3bfae8 Mon Sep 17 00:00:00 2001 From: Nick Date: Wed, 2 Feb 2011 16:21:52 +0100 Subject: [PATCH] attempted fix of color/underline issue. this is a bit of a hack, and seems to work some places, but not everywhere --- deluge/ui/console/colors.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/deluge/ui/console/colors.py b/deluge/ui/console/colors.py index 7d7944b3c..bc092373c 100644 --- a/deluge/ui/console/colors.py +++ b/deluge/ui/console/colors.py @@ -99,6 +99,14 @@ def init_colors(): curses.init_pair(counter, getattr(curses, fg), getattr(curses, bg)) counter += 1 + # try to redefine white/black as it makes underlining work for some terminals + # but can also fail on others, so we try/except + try: + curses.init_pair(counter, curses.COLOR_WHITE, curses.COLOR_BLACK) + color_pairs[("white","black")] = counter + except: + pass + class BadColorString(Exception): pass