From 531effc63e2b633a4d89650bda9597892976b30c Mon Sep 17 00:00:00 2001 From: uwe Date: Tue, 5 Jun 2018 21:11:50 +0000 Subject: [PATCH] PR kern/53245 - support SGR 39 (default foreground) and 49 (background). --- sys/dev/wscons/wsemul_vt100_subr.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/dev/wscons/wsemul_vt100_subr.c b/sys/dev/wscons/wsemul_vt100_subr.c index a37f9307cec4..418f1df17fb1 100644 --- a/sys/dev/wscons/wsemul_vt100_subr.c +++ b/sys/dev/wscons/wsemul_vt100_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: wsemul_vt100_subr.c,v 1.21 2017/05/19 19:22:33 macallan Exp $ */ +/* $NetBSD: wsemul_vt100_subr.c,v 1.22 2018/06/05 21:11:50 uwe Exp $ */ /* * Copyright (c) 1998 @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100_subr.c,v 1.21 2017/05/19 19:22:33 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wsemul_vt100_subr.c,v 1.22 2018/06/05 21:11:50 uwe Exp $"); #include #include @@ -516,12 +516,18 @@ wsemul_vt100_handle_csi(struct vt100base_data *edp, u_char c) flags |= WSATTR_WSCOLORS; fgcol = ARG(edp, n) - 30; break; + case 39: + fgcol = edp->msgattrs.default_fg; + break; case 40: case 41: case 42: case 43: case 44: case 45: case 46: case 47: /* bg color */ flags |= WSATTR_WSCOLORS; bgcol = ARG(edp, n) - 40; break; + case 49: + bgcol = edp->msgattrs.default_bg; + break; default: #ifdef VT100_PRINTUNKNOWN printf("CSI%dm unknown\n", ARG(edp, n));