summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--term.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/term.c b/term.c
index 357861f..97a3ee1 100644
--- a/term.c
+++ b/term.c
@@ -233,6 +233,7 @@ enum {
 	EL,
 	DL  = 'M',
 	DCH = 'P',
+	ECH = 'X',
 	VPA = 'd',
 	SM  = 'h',
 	RM  = 'l',
@@ -293,6 +294,11 @@ static char updateCSI(wchar_t ch) {
 			if (ps[0] == 1) b = cell(y, x);
 			clear(a, b);
 		}
+		break; case ECH: {
+			struct Cell *a = cell(y, x);
+			struct Cell *b = cell(y, MIN(x + (n > 0 ? ps[0] - 1 : 0), cols - 1));
+			clear(a, b);
+		}
 
 		break; case DL: {
 			uint i = MIN((n ? ps[0] : 1), rows - y);