- T((T_CALLED("wattr_on(%p,%s)"), win, _traceattr(at)));
- if (win) {
- T(("... current %s", _traceattr(win->_attrs)));
- toggle_attr_on(win->_attrs, at);
+ T((T_CALLED("wattr_on(%p,%s)"), (void *) win, _traceattr(at)));
+ if (win != 0) {
+ T(("... current %s (%d)",
+ _traceattr(WINDOW_ATTRS(win)),
+ GET_WINDOW_PAIR(win)));
+
+ if_EXT_COLORS({
+ if (at & A_COLOR) {
+ win->_color = PairNumber(at);
+ set_extended_pair(opts, win->_color);
+ }
+ });
+ toggle_attr_on(WINDOW_ATTRS(win), at);