From 508b30dd1bdcfa9450dd4c1e5470e335bc0dc13d Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Thu, 1 Aug 2019 17:14:38 -0400 Subject: Implement ECH --- term.c | 6 ++++++ 1 file changed, 6 insertions(+) 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); -- cgit 1.4.1