curses: remove unnecessary special handling for dark gray
On terminals with at least 16 colors there should be no need for special handling dark gray. The curses code uses COLORS < 16, COLORS <= 16, COLORS > 16, or COLORS >= 16 at several places although I'm not sure if they are correct or which could possibly be off-by-one errors. But realistically in this case, we only need to distinguish between 8 color terminals and terminals supporting more than 8 colors as this will mean the terminal supports at least 256 colors.
This commit is contained in:
@@ -1553,7 +1553,7 @@ curses_color_attr(int nh_color, int bg_color)
|
||||
if (!nh_color) {
|
||||
#ifdef USE_DARKGRAY
|
||||
if (iflags.wc2_darkgray) {
|
||||
if (!can_change_color() || COLORS <= 16)
|
||||
if (COLORS <= 16)
|
||||
cattr |= A_BOLD;
|
||||
} else
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user