mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-12 04:24:27 +00:00
attempted fix of color/underline issue.
this is a bit of a hack, and seems to work some places, but not everywhere
This commit is contained in:
parent
ad498c6e42
commit
b35875e300
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user