From 0c74f831379f23e02bbd0e7b00207d8b6df8772e Mon Sep 17 00:00:00 2001 From: Curtis McEnroe Date: Wed, 7 Aug 2019 15:08:16 -0400 Subject: Implement DECSC and DECRC --- term.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/term.c b/term.c index 8c16c82..719e630 100644 --- a/term.c +++ b/term.c @@ -55,6 +55,9 @@ static bool insert; static struct { uint top, bot; } scroll; +static struct { + uint y, x; +} save; static struct Style style; static struct Cell *cells; @@ -128,6 +131,8 @@ static char updateNUL(wchar_t ch) { } enum C1 { + DECSC = '7', + DECRC = '8', IND = 'D', RI = 'M', CSI = '[', @@ -146,6 +151,9 @@ static char updateESC(wchar_t ch) { break; case CSI: return CSI; break; case OSC: return OSC; + break; case DECSC: save.y = y; save.x = x; + break; case DECRC: y = save.y; x = save.x; + break; case IND: scrollUp(1); break; case RI: scrollDown(1); -- cgit 1.4.1