diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-07-03 19:16:41 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-07-03 19:16:41 +0000 |
| commit | 90dadfcc228d890fb95cc7c210b24cd024f096ac (patch) | |
| tree | fd3929dbf7e6fb9393125abf10d7a07e221bb52f /vt.c | |
| parent | logging: disable debug logging by default (diff) | |
vt: implement (untested!) insert mode
\E4l is not horizontal index, but disable INSERT mode
Diffstat (limited to 'vt.c')
| -rw-r--r-- | vt.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -701,6 +701,15 @@ action(struct terminal *term, enum action action, uint8_t c) struct cell *cell = &term->grid->cur_line[term->cursor.col]; term_damage_update(term, term->cursor.linear, 1); + if (term->insert_mode) { + assert(false && "untested"); + grid_memmove( + term->grid, term->cursor.linear + 1, term->cursor.linear, + term->cols - term->cursor.col - 1); + term_damage_update( + term, term->cursor.linear + 1, term->cols - term->cursor.col - 1); + } + if (term->vt.utf8.idx > 0) { //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); |
