term: print: force line-wrap if a multi-column character does not fit on current line

This commit is contained in:
Daniel Eklöf 2020-07-14 10:58:57 +02:00
parent bc2fc778ae
commit 9dc1d18241
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 9 additions and 0 deletions

View file

@ -2388,6 +2388,12 @@ term_print(struct terminal *term, wchar_t wc, int width)
if (unlikely(width <= 0))
return;
if (term->grid->cursor.point.col + width > term->cols) {
/* Multi-column character that doesn't fit on current line -
* force a line wrap */
term->grid->cursor.lcf = 1;
}
print_linewrap(term);
print_insert(term, width);