vt: bug fix: clear utf-8 state after printing a utf-8 character

This commit is contained in:
Daniel Eklöf 2019-07-04 09:26:34 +02:00
parent 9f12bca21e
commit a191d98d09
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

1
vt.c
View file

@ -714,6 +714,7 @@ action(struct terminal *term, enum action action, uint8_t c)
//LOG_DBG("print: UTF8: %.*s", (int)term->vt.utf8.idx, term->vt.utf8.data);
memcpy(cell->c, term->vt.utf8.data, term->vt.utf8.idx);
cell->c[term->vt.utf8.idx] = '\0';
term->vt.utf8.idx = 0;
} else {
//LOG_DBG("print: ASCII: %c", c);
cell->c[0] = c;