Browse Source

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.
master
Hiltjo Posthuma 4 years ago
parent
commit
cde480c693
  1. 2
      st.c

2
st.c

@ -2307,7 +2307,7 @@ tputc(Rune u)
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 {

Loading…
Cancel
Save