Don't smash attributes when turning color values off. This was submitted
as a PR to GNATs but it evidently went astray somehow since I can't find it in the database now, nor does an assigned PR# appear on the mail I got. Sorry about that, Danny! Submitted-By: Danny R. Johnston <danny@simn.com>
This commit is contained in:
parent
0b64164fca
commit
479c200dea
@ -44,12 +44,12 @@ int wattroff(WINDOW *win, chtype at)
|
||||
if (PAIR_NUMBER(at) == 0xff) /* turn off color */
|
||||
win->_attrs &= ~at;
|
||||
else /* leave color alone */
|
||||
win->_attrs &= ~(at|~A_COLOR);
|
||||
win->_attrs &= ~(at & ~A_COLOR);
|
||||
} else {
|
||||
if (PAIR_NUMBER(at) > 0x00) /* turn off color */
|
||||
win->_attrs &= ~at;
|
||||
else /* leave color alone */
|
||||
win->_attrs &= ~(at|~A_COLOR);
|
||||
win->_attrs &= ~(at & ~A_COLOR);
|
||||
}
|
||||
T(("new attribute is %s", _traceattr(win->_attrs)));
|
||||
return OK;
|
||||
|
Loading…
x
Reference in New Issue
Block a user