From 62278a148bb5b51b727d8fdceca73da2c7223a42 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 8 Mar 2019 21:25:41 +0000 Subject: 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); -- cgit v1.2.3