vt: utf8-print: don’t build a compose chain on a zero-width base character

This commit is contained in:
Daniel Eklöf 2021-06-15 09:00:18 +02:00
parent 6187aa0b1b
commit dc5019a535
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

2
vt.c
View file

@ -640,6 +640,7 @@ action_utf8_print(struct terminal *term, wchar_t wc)
#endif #endif
int base_width = wcwidth(base); int base_width = wcwidth(base);
if (base_width > 0) {
term->grid->cursor.point.col = col; term->grid->cursor.point.col = col;
term->grid->cursor.lcf = false; term->grid->cursor.lcf = false;
@ -753,6 +754,7 @@ action_utf8_print(struct terminal *term, wchar_t wc)
LOG_WARN("maximum number of composed characters reached"); LOG_WARN("maximum number of composed characters reached");
} }
} }
}
term_reset_grapheme_state(term); term_reset_grapheme_state(term);
if (width > 0) if (width > 0)