Introduction
Introduction Statistics Contact Development Disclaimer Help
optimize column width calculation and utf-8 encode for ASCII - st - simple term…
git clone git://git.suckless.org/st
Log
Files
Refs
README
LICENSE
---
commit cde480c6939e62771ba3b60ef4eb848031aee9f9
parent 8211e36d281990a39db1853bcd454ac59e53d521
Author: Hiltjo Posthuma <[email protected]>
Date: Sat, 9 May 2020 14:03:14 +0200
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.
Diffstat:
M st.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/st.c b/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 {
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.