Fix disabling of bold and fastblink
According to ECMA-48¹ 8.3.117, an attribute value of 21 is "doubly underlined", while 22 is "normal colour or normal intensity (neither bold nor faint)". Additionally, 25 is "steady (not blinking)", which likely means neither slow blink nor fast blink. ¹: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>dev
parent
e8f3513bf4
commit
b4dfa18124
10
st.c
10
st.c
|
@ -1718,11 +1718,8 @@ tsetattr(int *attr, int l) {
|
||||||
case 9:
|
case 9:
|
||||||
term.c.attr.mode |= ATTR_STRUCK;
|
term.c.attr.mode |= ATTR_STRUCK;
|
||||||
break;
|
break;
|
||||||
case 21:
|
|
||||||
term.c.attr.mode &= ~ATTR_BOLD;
|
|
||||||
break;
|
|
||||||
case 22:
|
case 22:
|
||||||
term.c.attr.mode &= ~ATTR_FAINT;
|
term.c.attr.mode &= ~(ATTR_BOLD | ATTR_FAINT);
|
||||||
break;
|
break;
|
||||||
case 23:
|
case 23:
|
||||||
term.c.attr.mode &= ~ATTR_ITALIC;
|
term.c.attr.mode &= ~ATTR_ITALIC;
|
||||||
|
@ -1731,10 +1728,7 @@ tsetattr(int *attr, int l) {
|
||||||
term.c.attr.mode &= ~ATTR_UNDERLINE;
|
term.c.attr.mode &= ~ATTR_UNDERLINE;
|
||||||
break;
|
break;
|
||||||
case 25:
|
case 25:
|
||||||
term.c.attr.mode &= ~ATTR_BLINK;
|
term.c.attr.mode &= ~(ATTR_BLINK | ATTR_FASTBLINK);
|
||||||
break;
|
|
||||||
case 26:
|
|
||||||
term.c.attr.mode &= ~ATTR_FASTBLINK;
|
|
||||||
break;
|
break;
|
||||||
case 27:
|
case 27:
|
||||||
term.c.attr.mode &= ~ATTR_REVERSE;
|
term.c.attr.mode &= ~ATTR_REVERSE;
|
||||||
|
|
Loading…
Reference in New Issue