From 402fc78320b526901c55683dc384b386c1cf1a42 Mon Sep 17 00:00:00 2001 From: schwarze Date: Fri, 8 Mar 2019 21:25:40 +0000 Subject: [PATCH] Do not replace wcwidth(3) with a broken, hand-rolled re-implementation that comes bundled with xterm(1). Issue found and based on a diff from Lauri Tirkkonen . The final form of the diff follows a suggestion from tedu@. OK matthieu@ --- app/xterm/util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/xterm/util.c b/app/xterm/util.c index a3de4a005..e574f2d04 100644 --- a/app/xterm/util.c +++ b/app/xterm/util.c @@ -4991,6 +4991,10 @@ systemWcwidthOk(int samplesize, int samplepass) wchar_t n; int oops = 0; +#ifdef __OpenBSD__ + return 1; +#endif + for (n = 21; n <= 25; ++n) { wchar_t code = (wchar_t) dec2ucs(NULL, (unsigned) n); int system_code = wcwidth(code);