Handle regional indicators and emoji modifiers in a better way, GitHub

issue 3998.
This commit is contained in:
nicm
2025-11-01 16:44:24 +00:00
parent 8cb2805eb7
commit d90b414223
4 changed files with 117 additions and 68 deletions

View File

@@ -2050,11 +2050,9 @@ screen_write_combine(struct screen_write_ctx *ctx, const struct grid_cell *gc)
case HANGULJAMO_STATE_COMPOSABLE:
break;
case HANGULJAMO_STATE_NOT_HANGULJAMO:
if (utf8_is_modifier(ud)) {
if (last.data.size < 2)
return (0);
if (utf8_should_combine(&last.data, ud))
force_wide = 1;
} else if (!utf8_has_zwj(&last.data))
else if (!utf8_has_zwj(&last.data))
return (0);
break;
}