Module Name: src
Committed By: rin
Date: Tue Jul 30 12:20:24 UTC 2019
Modified Files:
src/sys/dev/rasops: rasops.c
Log Message:
Treat highlighted and reversed text in the same manner to xterm.
To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 src/sys/dev/rasops/rasops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/rasops/rasops.c
diff -u src/sys/dev/rasops/rasops.c:1.97 src/sys/dev/rasops/rasops.c:1.98
--- src/sys/dev/rasops/rasops.c:1.97 Mon Jul 29 16:17:29 2019
+++ src/sys/dev/rasops/rasops.c Tue Jul 30 12:20:24 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: rasops.c,v 1.97 2019/07/29 16:17:29 rin Exp $ */
+/* $NetBSD: rasops.c,v 1.98 2019/07/30 12:20:24 rin Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.97 2019/07/29 16:17:29 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.98 2019/07/30 12:20:24 rin Exp $");
#include "opt_rasops.h"
#include "rasops_glue.h"
@@ -618,16 +618,16 @@ rasops_allocattr_color(void *cookie, int
#endif
}
+ if ((flg & WSATTR_HILIT) != 0)
+ fg += 8;
+
if ((flg & WSATTR_REVERSE) != 0) {
uint32_t swap = fg;
fg = bg;
bg = swap;
}
- if ((flg & WSATTR_HILIT) != 0)
- fg += 8;
-
- flg = flg & WSATTR_USERMASK;
+ flg &= WSATTR_USERMASK;
if (rasops_isgray[fg])
flg |= WSATTR_PRIVATE1;