diff options
Diffstat (limited to 'vt.c')
| -rw-r--r-- | vt.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -187,6 +187,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'; + memset(&term->vt.utf8, 0, sizeof(term->vt.utf8)); } else { //LOG_DBG("print: ASCII: %c", c); cell->c[0] = c; @@ -288,10 +289,14 @@ vt_from_slave(struct terminal *term, const uint8_t *data, size_t len) if (current_state == STATE_UTF8) { if (!process_utf8(term, data[i])) abort(); + + current_state = term->vt.state; if (current_state == STATE_UTF8) continue; + if (!action(term, ACTION_PRINT, 0)) abort(); + continue; } |
