summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--term.c8
1 files changed, 8 insertions, 0 deletions
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);