summaryrefslogtreecommitdiffstats
path: root/utf8.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2021-12-06 10:17:34 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2021-12-06 10:17:34 +0000
commitef676e1202a4d5c423d5bba2f8ecba1f768d8364 (patch)
treefe05cdf6851ca3d504daf2c51ff490cdaffbf377 /utf8.c
parent10b3cd17fa94e3ac129080e68c69d2130b015fb2 (diff)
Remove fallback for wcwidth failure, GitHub issue 3003.
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/utf8.c b/utf8.c
index 56f20cbb..df75a769 100644
--- a/utf8.c
+++ b/utf8.c
@@ -237,21 +237,6 @@ utf8_width(struct utf8_data *ud, int *width)
if (*width >= 0 && *width <= 0xff)
return (UTF8_DONE);
log_debug("UTF-8 %.*s, wcwidth() %d", (int)ud->size, ud->data, *width);
-
-#ifndef __OpenBSD__
- /*
- * Many platforms (particularly and inevitably OS X) have no width for
- * relatively common characters (wcwidth() returns -1); assume width 1
- * in this case. This will be wrong for genuinely nonprintable
- * characters, but they should be rare. We may pass through stuff that
- * ideally we would block, but this is no worse than sending the same
- * to the terminal without tmux.
- */
- if (*width < 0) {
- *width = 1;
- return (UTF8_DONE);
- }
-#endif
return (UTF8_ERROR);
}