From 481669067f721a6aebc1009f047509fbb04b6811 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 17 Oct 2014 23:22:01 -0400 Subject: implement ECH --- src/screen.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/screen.c') 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) { -- cgit v1.2.3-54-g00ecf