From 598cad91fdab49db0267785b8e1efafe5042ed40 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Thu, 20 Jul 2000 13:12:58 +0000 Subject: [PATCH] Accorfing to ECMA-48 SGR 39 and 49 are just another colors and must not reset other attrs, so reset only bold on 39 --- sys/dev/syscons/scterm-sc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/syscons/scterm-sc.c b/sys/dev/syscons/scterm-sc.c index cb6ea232f6cd..fc555b44b46f 100644 --- a/sys/dev/syscons/scterm-sc.c +++ b/sys/dev/syscons/scterm-sc.c @@ -407,7 +407,7 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c) tcp->cur_attr = mask2attr(tcp); break; case 39: /* restore fg color back to normal */ - tcp->attr_mask &= BG_CHANGED; + tcp->attr_mask &= ~(FG_CHANGED|BOLD_ATTR); tcp->cur_color.fg = tcp->std_color.fg; tcp->cur_attr = mask2attr(tcp); break; @@ -419,7 +419,7 @@ scterm_scan_esc(scr_stat *scp, term_stat *tcp, u_char c) tcp->cur_attr = mask2attr(tcp); break; case 49: /* restore bg color back to normal */ - tcp->attr_mask &= ~(BG_CHANGED|REVERSE_ATTR); + tcp->attr_mask &= ~BG_CHANGED; tcp->cur_color.bg = tcp->std_color.bg; tcp->cur_attr = mask2attr(tcp); break;