mirror of
https://github.com/LukeSmithxyz/st.git
synced 2024-11-24 16:05:47 +01:00
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.
This commit is contained in:
parent
8211e36d28
commit
cde480c693
1 changed files with 1 additions and 1 deletions
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…
Reference in a new issue