diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-10-17 23:22:01 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-10-17 23:22:01 -0400 |
commit | 481669067f721a6aebc1009f047509fbb04b6811 (patch) | |
tree | ce8db3839685304b7499a4d7e4031accef5cc8c1 /src/screen.c | |
parent | bf287b90c30c0e3badce878ac478fdbcdfd04b5d (diff) | |
download | libvt100-481669067f721a6aebc1009f047509fbb04b6811.tar.gz libvt100-481669067f721a6aebc1009f047509fbb04b6811.zip |
implement ECH
Diffstat (limited to 'src/screen.c')
-rw-r--r-- | src/screen.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/screen.c b/src/screen.c index 8e8f783..4abbbdc 100644 --- a/src/screen.c +++ b/src/screen.c @@ -488,6 +488,27 @@ void vt100_screen_delete_lines(VT100Screen *vt, int count) vt->dirty = 1; } +void vt100_screen_erase_characters(VT100Screen *vt, int count) +{ + if (count >= vt->grid->max.col - vt->grid->cur.col) { + vt100_screen_kill_line_forward(vt); + } + else { + struct vt100_row *row; + int i; + + row = vt100_screen_row_at(vt, vt->grid->cur.row); + + for (i = vt->grid->cur.col; i < vt->grid->cur.col + count; ++i) { + struct vt100_cell *cell = &row->cells[i]; + + cell->len = 0; + } + } + + vt->dirty = 1; +} + void vt100_screen_set_scroll_region( VT100Screen *vt, int top, int bottom, int left, int right) { |