summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-08-01 17:14:38 -0400
committerJune McEnroe <june@causal.agency>2019-08-01 17:14:38 -0400
commit508b30dd1bdcfa9450dd4c1e5470e335bc0dc13d (patch)
treef791f3707a908f4b2c06ba098c1e2c48ef0a13d1
parentUse PSCap in updateCSI and styleDiff (diff)
downloadstream-508b30dd1bdcfa9450dd4c1e5470e335bc0dc13d.tar.gz
stream-508b30dd1bdcfa9450dd4c1e5470e335bc0dc13d.zip
Implement ECH
Diffstat (limited to '')
-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);