summaryrefslogtreecommitdiffstats
path: root/st.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2014-07-26 00:48:15 -0700
committerRoberto E. Vargas Caballero <k0ga@shike2.com>2014-07-26 10:13:11 +0200
commitb4dfa18124451f9ee29a0719ef36ffd58fae4477 (patch)
treecb6e60eed41a069d0a3204a704ada4c5059c7ca3 /st.c
parentAdd info about Backspace and Delete to the FAQ (diff)
downloadst-b4dfa18124451f9ee29a0719ef36ffd58fae4477.tar.gz
st-b4dfa18124451f9ee29a0719ef36ffd58fae4477.zip
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>
Diffstat (limited to 'st.c')
-rw-r--r--st.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/st.c b/st.c
index 546db41..0c917fd 100644
--- a/st.c
+++ b/st.c
@@ -1718,11 +1718,8 @@ tsetattr(int *attr, int l) {
1718 case 9: 1718 case 9:
1719 term.c.attr.mode |= ATTR_STRUCK; 1719 term.c.attr.mode |= ATTR_STRUCK;
1720 break; 1720 break;
1721 case 21:
1722 term.c.attr.mode &= ~ATTR_BOLD;
1723 break;
1724 case 22: 1721 case 22:
1725 term.c.attr.mode &= ~ATTR_FAINT; 1722 term.c.attr.mode &= ~(ATTR_BOLD | ATTR_FAINT);
1726 break; 1723 break;
1727 case 23: 1724 case 23:
1728 term.c.attr.mode &= ~ATTR_ITALIC; 1725 term.c.attr.mode &= ~ATTR_ITALIC;
@@ -1731,10 +1728,7 @@ tsetattr(int *attr, int l) {
1731 term.c.attr.mode &= ~ATTR_UNDERLINE; 1728 term.c.attr.mode &= ~ATTR_UNDERLINE;
1732 break; 1729 break;
1733 case 25: 1730 case 25:
1734 term.c.attr.mode &= ~ATTR_BLINK; 1731 term.c.attr.mode &= ~(ATTR_BLINK | ATTR_FASTBLINK);
1735 break;
1736 case 26:
1737 term.c.attr.mode &= ~ATTR_FASTBLINK;
1738 break; 1732 break;
1739 case 27: 1733 case 27:
1740 term.c.attr.mode &= ~ATTR_REVERSE; 1734 term.c.attr.mode &= ~ATTR_REVERSE;