aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-12-26 15:42:53 +0000
committerDaniel Eklöf <daniel@ekloef.se>2024-03-07 15:24:34 +0000
commit60c5d889ecd8b0496e181f587dc2c6368a209b06 (patch)
tree1d30b25684fc1eb07500c4d14689257ca61b3423
parentcsi: DECRARA: fix comment: DECCARA -> DECRARA (diff)
vt: DECALN: erase sixels, reset margins, home the cursor
https://vt100.net/docs/vt510-rm/DECALN.html: Notes on DECALN DECALN sets the margins to the extremes of the page, and moves the cursor to the home position.
-rw-r--r--vt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/vt.c b/vt.c
index beb26670..a8a0f0fb 100644
--- a/vt.c
+++ b/vt.c
@@ -18,6 +18,7 @@
#include "debug.h"
#include "grid.h"
#include "osc.h"
+#include "sixel.h"
#include "util.h"
#include "xmalloc.h"
@@ -561,8 +562,15 @@ action_esc_dispatch(struct terminal *term, uint8_t final)
case '#':
switch (final) {
case '8': /* DECALN */
+ sixel_overwrite_by_rectangle(term, 0, 0, term->rows, term->cols);
+
+ term->scroll_region.start = 0;
+ term->scroll_region.end = term->rows;
+
for (int r = 0; r < term->rows; r++)
term_fill(term, r, 0, 'E', term->cols, false);
+
+ term_cursor_home(term);
break;
}
break; /* private[0] == '#' */