mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Make U+FE0F VARIATION SELECTOR-16 change the width from 1 to 2. GitHub
issue 3409.
This commit is contained in:
11
utf8.c
11
utf8.c
@ -227,12 +227,11 @@ utf8_width(struct utf8_data *ud, int *width)
|
||||
return (UTF8_ERROR);
|
||||
}
|
||||
*width = wcwidth(wc);
|
||||
if (*width < 0 || *width > 0xff) {
|
||||
log_debug("UTF-8 %.*s, wcwidth() %d", (int)ud->size, ud->data,
|
||||
*width);
|
||||
return (UTF8_ERROR);
|
||||
}
|
||||
return (UTF8_DONE);
|
||||
log_debug("UTF-8 %.*s %#x, wcwidth() %d", (int)ud->size, ud->data,
|
||||
(u_int)wc, *width);
|
||||
if (*width >= 0 && *width <= 0xff)
|
||||
return (UTF8_DONE);
|
||||
return (UTF8_ERROR);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user