commit c5955d14cedf015fb2f5e6f25f1c042a075195b8
parent 7d383799192a2dd5f99fc59725a721280450df1f
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 10 Jun 2019 17:22:41 +0200
chars: speed up the determination of length and width for plain ASCII
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/chars.c b/src/chars.c
@@ -207,7 +207,7 @@ char control_mbrep(const char *c, bool isdata)
int length_of_char(const char *c, int *width)
{
#ifdef ENABLE_UTF8
- if (use_utf8) {
+ if (use_utf8 && (signed char)*c < 0) {
wchar_t wc;
int charlen = mbtowc(&wc, c, MAXCHARLEN);