diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2019-03-08 21:25:41 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2019-03-08 21:25:41 +0000 |
commit | 62278a148bb5b51b727d8fdceca73da2c7223a42 (patch) | |
tree | 8b735bf4bc028d974b5bdfc1b7f18daa0f691b29 | |
parent | 7b36874570077fe5173909797e9002abb93cb58f (diff) |
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 <lotheac at iki dot fi>.
The final form of the diff follows a suggestion from tedu@.
OK matthieu@
-rw-r--r-- | app/xterm/util.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |