Revert "remove special case white/black pair. doesn't seem needed and breaks white,black,attrs"

This does actually seem to break some terminals

This reverts commit ba3a093746a51fd46b9b0bcaf72847549e0c94b3.
This commit is contained in:
Nick 2011-02-02 13:57:31 +01:00
parent d1b3aa54ad
commit ad498c6e42

View File

@ -50,7 +50,9 @@ colors = [
] ]
# {(fg, bg): pair_number, ...} # {(fg, bg): pair_number, ...}
color_pairs = {} color_pairs = {
("white", "black"): 0 # Special case, can't be changed
}
# Some default color schemes # Some default color schemes
schemes = { schemes = {
@ -91,6 +93,8 @@ def init_colors():
counter = 1 counter = 1
for fg in colors: for fg in colors:
for bg in colors: for bg in colors:
if fg == "COLOR_WHITE" and bg == "COLOR_BLACK":
continue
color_pairs[(fg[6:].lower(), bg[6:].lower())] = counter color_pairs[(fg[6:].lower(), bg[6:].lower())] = counter
curses.init_pair(counter, getattr(curses, fg), getattr(curses, bg)) curses.init_pair(counter, getattr(curses, fg), getattr(curses, bg))
counter += 1 counter += 1