diff options
author | Joshua M. Clulow <jmc@joyent.com> | 2016-03-11 14:18:59 -0800 |
---|---|---|
committer | Joshua M. Clulow <jmc@joyent.com> | 2016-03-12 02:22:48 +0000 |
commit | 721b3d2e003eb1961a2ad207d02d26bab046c3d0 (patch) | |
tree | e619e4c0e375d13333b4ceffa1a55bb9670ae85a | |
parent | 9ec912c21521e92e1de73a78ac141cf60433b5b3 (diff) | |
download | illumos-joyent-721b3d2e003eb1961a2ad207d02d26bab046c3d0.tar.gz |
OS-5235 wscons should support reset fg/bg SGR sequences
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
-rw-r--r-- | usr/src/uts/common/io/tem_safe.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/usr/src/uts/common/io/tem_safe.c b/usr/src/uts/common/io/tem_safe.c index fa2e4916cd..f15fae6c55 100644 --- a/usr/src/uts/common/io/tem_safe.c +++ b/usr/src/uts/common/io/tem_safe.c @@ -25,6 +25,10 @@ */ /* + * Copyright 2016 Joyent, Inc. + */ + +/* * Polled I/O safe ANSI terminal emulator module; * Supporting TERM types 'sun' and 'sun-color, parsing * ANSI x3.64 escape sequences, and the like. (See wscons(7d) @@ -507,6 +511,13 @@ tem_safe_selgraph(struct tem_vt_state *tem) tem->tvs_fg_color = param - 30; break; + case 39: + /* + * Reset the foreground colour. + */ + tem->tvs_fg_color = tems.ts_init_color.fg_color; + break; + case 40: /* black (grey) background */ case 41: /* red (light red) background */ case 42: /* green (light green) background */ @@ -518,6 +529,13 @@ tem_safe_selgraph(struct tem_vt_state *tem) tem->tvs_bg_color = param - 40; break; + case 49: + /* + * Reset the background colour. + */ + tem->tvs_bg_color = tems.ts_init_color.bg_color; + break; + default: break; } |