From f74026ba9bcf9c2526c2d6c6072c69bc733bcf6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 17 Nov 2019 09:36:55 +0100 Subject: [PATCH] csi: el/ed/dch/ich/ech: reset 'print_needs_wrap' (lcf) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes the result of 'wraptest', by Mattias EngdegÄrd, match the behavior of 'DEC' (the architectural behavior of DEC terminals). --- csi.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/csi.c b/csi.c index c39653e1..3a01b36e 100644 --- a/csi.c +++ b/csi.c @@ -413,11 +413,13 @@ csi_dispatch(struct terminal *term, uint8_t final) term, &term->cursor, &(struct coord){term->cols - 1, term->rows - 1}); + term->print_needs_wrap = false; break; case 1: /* From start of screen to cursor */ term_erase(term, &(struct coord){0, 0}, &term->cursor); + term->print_needs_wrap = false; break; case 2: @@ -426,6 +428,7 @@ csi_dispatch(struct terminal *term, uint8_t final) term, &(struct coord){0, 0}, &(struct coord){term->cols - 1, term->rows - 1}); + term->print_needs_wrap = false; break; case 3: { @@ -468,12 +471,14 @@ csi_dispatch(struct terminal *term, uint8_t final) term, &term->cursor, &(struct coord){term->cols - 1, term->cursor.row}); + term->print_needs_wrap = false; break; case 1: /* From start of line to cursor */ term_erase( term, &(struct coord){0, term->cursor.row}, &term->cursor); + term->print_needs_wrap = false; break; case 2: @@ -482,6 +487,7 @@ csi_dispatch(struct terminal *term, uint8_t final) term, &(struct coord){0, term->cursor.row}, &(struct coord){term->cols - 1, term->cursor.row}); + term->print_needs_wrap = false; break; default: @@ -552,6 +558,7 @@ csi_dispatch(struct terminal *term, uint8_t final) term, &(struct coord){term->cursor.col + remaining, term->cursor.row}, &(struct coord){term->cols - 1, term->cursor.row}); + term->print_needs_wrap = false; break; } @@ -578,6 +585,7 @@ csi_dispatch(struct terminal *term, uint8_t final) term, &term->cursor, &(struct coord){term->cursor.col + count - 1, term->cursor.row}); + term->print_needs_wrap = false; break; } @@ -598,6 +606,7 @@ csi_dispatch(struct terminal *term, uint8_t final) term, &term->cursor, &(struct coord){term->cursor.col + count - 1, term->cursor.row}); + term->print_needs_wrap = false; break; }