mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Merge pull request #5461 from jamessan/emoji-ui-regression
ui: Fix the call to utf_ambiguous_width
This commit is contained in:
commit
6bc3bcefc6
@ -1724,7 +1724,7 @@ int utf_class(int c)
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
int utf_ambiguous_width(int c)
|
bool utf_ambiguous_width(int c)
|
||||||
{
|
{
|
||||||
return c >= 0x80 && (intable(ambiguous, ARRAY_SIZE(ambiguous), c)
|
return c >= 0x80 && (intable(ambiguous, ARRAY_SIZE(ambiguous), c)
|
||||||
|| intable(emoji_all, ARRAY_SIZE(emoji_all), c));
|
|| intable(emoji_all, ARRAY_SIZE(emoji_all), c));
|
||||||
|
@ -397,9 +397,8 @@ static void send_output(uint8_t **ptr)
|
|||||||
size_t clen = (size_t)mb_ptr2len(p);
|
size_t clen = (size_t)mb_ptr2len(p);
|
||||||
UI_CALL(put, p, (size_t)clen);
|
UI_CALL(put, p, (size_t)clen);
|
||||||
col++;
|
col++;
|
||||||
if (utf_ambiguous_width(*p)) {
|
if (utf_ambiguous_width(utf_ptr2char(p))) {
|
||||||
pending_cursor_update = true;
|
pending_cursor_update = true;
|
||||||
flush_cursor_update();
|
|
||||||
} else if (mb_ptr2cells(p) > 1) {
|
} else if (mb_ptr2cells(p) > 1) {
|
||||||
// double cell character, blank the next cell
|
// double cell character, blank the next cell
|
||||||
UI_CALL(put, NULL, 0);
|
UI_CALL(put, NULL, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user