aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--terminal.h1
-rw-r--r--vt.c10
2 files changed, 11 insertions, 0 deletions
diff --git a/terminal.h b/terminal.h
index 71b59e4d..9349de01 100644
--- a/terminal.h
+++ b/terminal.h
@@ -102,6 +102,7 @@ struct vt {
int left;
} utf8;
struct attributes attrs;
+ struct attributes saved_attrs;
bool dim;
};
diff --git a/vt.c b/vt.c
index a427f67b..0c2cd1c7 100644
--- a/vt.c
+++ b/vt.c
@@ -567,6 +567,16 @@ esc_dispatch(struct terminal *term, uint8_t final)
#endif
switch (final) {
+ case '7':
+ term->saved_cursor = term->cursor;
+ term->vt.saved_attrs = term->vt.attrs;
+ break;
+
+ case '8':
+ term->cursor = term->saved_cursor;
+ term->vt.attrs = term->vt.saved_attrs;
+ break;
+
case 'B': {
/* Configure G0-G3 to use ASCII */
char param = term->vt.params.idx > 0 ? term->vt.params.v[0].value : '(';