Accorfing to ECMA-48 SGR 39 and 49 are just another colors and must not reset

other attrs, so reset only bold on 39
This commit is contained in:
Andrey A. Chernov 2000-07-20 13:12:58 +00:00
parent 55c01a42ed
commit 598cad91fd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=63649

View File

@ -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;