aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/syscons
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-09-03 16:31:11 +0000
committerEd Schouten <ed@FreeBSD.org>2009-09-03 16:31:11 +0000
commit4a6ecf078b305719d32266a5c7ea0756cc1ea06d (patch)
treea9087c764d89b371208982c932f94c66e4e73f2f /sys/dev/syscons
parent8460188c5be1b9d59beab8781614d650ec408940 (diff)
Notes
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r--sys/dev/syscons/scterm-teken.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/dev/syscons/scterm-teken.c b/sys/dev/syscons/scterm-teken.c
index 6f51ac17035b..133d62208054 100644
--- a/sys/dev/syscons/scterm-teken.c
+++ b/sys/dev/syscons/scterm-teken.c
@@ -300,12 +300,20 @@ static unsigned int
scteken_attr(const teken_attr_t *a)
{
unsigned int attr = 0;
+ teken_color_t fg, bg;
+ if (a->ta_format & TF_REVERSE) {
+ fg = a->ta_bgcolor;
+ bg = a->ta_fgcolor;
+ } else {
+ fg = a->ta_fgcolor;
+ bg = a->ta_bgcolor;
+ }
if (a->ta_format & TF_BOLD)
- attr |= fgcolors_bold[a->ta_fgcolor];
+ attr |= fgcolors_bold[fg];
else
- attr |= fgcolors_normal[a->ta_fgcolor];
- attr |= bgcolors[a->ta_bgcolor];
+ attr |= fgcolors_normal[fg];
+ attr |= bgcolors[bg];
#ifdef FG_UNDERLINE
if (a->ta_format & TF_UNDERLINE)