From 89dbc61a34310e6213d69477ae16e9e63f46836c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 5 Nov 2019 13:21:47 +0100 Subject: [PATCH] csi: DECCOLM erases screen --- csi.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/csi.c b/csi.c index 01adf073..af591325 100644 --- a/csi.c +++ b/csi.c @@ -725,6 +725,10 @@ csi_dispatch(struct terminal *term, uint8_t final) case 3: LOG_WARN("unimplemented: 132 column mode (DECCOLM, %s)", csi_as_string(term, final)); + term_erase( + term, + &(struct coord){0, 0}, + &(struct coord){term->cols - 1, term->rows - 1}); break; case 5: @@ -831,6 +835,10 @@ csi_dispatch(struct terminal *term, uint8_t final) case 3: /* DECCOLM - 80 column mode */ + term_erase( + term, + &(struct coord){0, 0}, + &(struct coord){term->cols - 1, term->rows - 1}); break; case 4: @@ -843,6 +851,13 @@ csi_dispatch(struct terminal *term, uint8_t final) term_damage_all(term); break; + case 6: { /* DECOM */ + term->origin = ORIGIN_ABSOLUTE; + struct coord new_home = term_cursor_rel_to_abs(term, 0, 0); + term_cursor_to(term, new_home.row, new_home.col); + break; + } + case 7: term->auto_margin = false; break;