all repos — st @ cde480c6939e62771ba3b60ef4eb848031aee9f9

st (suckless terminal) config

optimize column width calculation and utf-8 encode for ASCII

In particular on OpenBSD and on glibc wcwidth() is quite expensive.
On musl there is little difference.
Hiltjo Posthuma hiltjo@codemadness.org
commit

cde480c6939e62771ba3b60ef4eb848031aee9f9

parent

8211e36d281990a39db1853bcd454ac59e53d521

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M st.cst.c

@@ -2307,7 +2307,7 @@ int width, len;

Glyph *gp; control = ISCONTROL(u); - if (!IS_SET(MODE_UTF8 | MODE_SIXEL)) { + if (u < 127 || !IS_SET(MODE_UTF8 | MODE_SIXEL)) { c[0] = u; width = len = 1; } else {