From 12df16a98ad58ab8fe019d0a71f72cb6dcebfdd0 Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Sat, 10 Aug 2019 15:54:12 -0400 Subject: Handle HT --- term.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'term.c') diff --git a/term.c b/term.c index b7c7e66..52e9257 100644 --- a/term.c +++ b/term.c @@ -133,6 +133,7 @@ static void escUnhandled(struct Term *t, wchar_t ch) { #define P(i, z) ((i) < t->param.n ? t->param.s[(i)] : (z)) ACTION(bs) { if (X) X--; } +ACTION(ht) { X = MIN(X - X % 8 + 8, R); } ACTION(cr) { X = 0; } ACTION(cuu) { Y -= MIN(P(0, 1), Y); } ACTION(cud) { Y = MIN(Y + P(0, 1), B); } @@ -352,6 +353,7 @@ static Action *Actions[][128] = { [NUL][0] = add, [NUL][BEL] = nop, [NUL][BS] = bs, + [NUL][HT] = ht, [NUL][NL] = nl, [NUL][CR] = cr, [NUL][ESC] = esc, -- cgit 1.4.1