ROTE_ATTR_MOD_BOLD(rt->curattr,1);
else if (param[i] == 5) /* set blink */
ROTE_ATTR_MOD_BLINK(rt->curattr,1);
- else if (param[i] == 7) rt->curattr = 0x07; /* reverse video */
+ else if (param[i] == 7 || param[i] == 27) { /* reverse video */
+ int fg = ROTE_ATTR_FG(rt->curattr);
+ int bg = ROTE_ATTR_BG(rt->curattr);
+ ROTE_ATTR_MOD_FG(rt->curattr, bg);
+ ROTE_ATTR_MOD_BG(rt->curattr, fg);
+ }
else if (param[i] == 8) rt->curattr = 0x0; /* invisible */
else if (param[i] == 22 || param[i] == 24) /* bold off */
ROTE_ATTR_MOD_BOLD(rt->curattr,0);
else if (param[i] == 25) /* blink off */
ROTE_ATTR_MOD_BLINK(rt->curattr,0);
- else if (param[i] == 27) /* negative off */
- rt->curattr = 0x70;
else if (param[i] == 28) /* invisible off */
rt->curattr = 0x70;
else if (param[i] >= 30 && param[i] <= 37) /* set fg */