Remove fallback for wcwidth failure, GitHub issue 3003.

pull/3012/head
Nicholas Marriott 2021-12-06 10:17:34 +00:00
parent 10b3cd17fa
commit ef676e1202
1 changed files with 0 additions and 15 deletions

15
utf8.c
View File

@ -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);
}