<Someone> reported a poor display result on the win32 tty
when hilite_pet was enabled. After checking into it, the test was looking for the value: (FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_RED) which signifies a white color on win32 console I/O. The problem was that in some cases that was OR'd with something else such as FOREGROUND_INTENSITY. Fix it by checking only the bits that matter when turning on the attribute.
This commit is contained in:
+1
-1
@@ -791,7 +791,7 @@ term_start_attr(int attr)
|
|||||||
break;
|
break;
|
||||||
case ATR_INVERSE:
|
case ATR_INVERSE:
|
||||||
/* Suggestion by Lee Berger */
|
/* Suggestion by Lee Berger */
|
||||||
if (currentcolor == (FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_RED))
|
if (currentcolor & (FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_RED))
|
||||||
currentcolor = 0;
|
currentcolor = 0;
|
||||||
currentbackground = (BACKGROUND_RED|BACKGROUND_BLUE|BACKGROUND_GREEN);
|
currentbackground = (BACKGROUND_RED|BACKGROUND_BLUE|BACKGROUND_GREEN);
|
||||||
colorchange = TRUE;
|
colorchange = TRUE;
|
||||||
|
|||||||
Reference in New Issue
Block a user