csi: el/ed/dch/ich/ech: reset 'print_needs_wrap' (lcf)

This makes the result of 'wraptest', by Mattias Engdegård, match the
behavior of 'DEC' (the architectural behavior of DEC terminals).
This commit is contained in:
Daniel Eklöf 2019-11-17 09:36:55 +01:00
parent 81215e5a72
commit f74026ba9b
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

9
csi.c
View file

@ -413,11 +413,13 @@ csi_dispatch(struct terminal *term, uint8_t final)
term, term,
&term->cursor, &term->cursor,
&(struct coord){term->cols - 1, term->rows - 1}); &(struct coord){term->cols - 1, term->rows - 1});
term->print_needs_wrap = false;
break; break;
case 1: case 1:
/* From start of screen to cursor */ /* From start of screen to cursor */
term_erase(term, &(struct coord){0, 0}, &term->cursor); term_erase(term, &(struct coord){0, 0}, &term->cursor);
term->print_needs_wrap = false;
break; break;
case 2: case 2:
@ -426,6 +428,7 @@ csi_dispatch(struct terminal *term, uint8_t final)
term, term,
&(struct coord){0, 0}, &(struct coord){0, 0},
&(struct coord){term->cols - 1, term->rows - 1}); &(struct coord){term->cols - 1, term->rows - 1});
term->print_needs_wrap = false;
break; break;
case 3: { case 3: {
@ -468,12 +471,14 @@ csi_dispatch(struct terminal *term, uint8_t final)
term, term,
&term->cursor, &term->cursor,
&(struct coord){term->cols - 1, term->cursor.row}); &(struct coord){term->cols - 1, term->cursor.row});
term->print_needs_wrap = false;
break; break;
case 1: case 1:
/* From start of line to cursor */ /* From start of line to cursor */
term_erase( term_erase(
term, &(struct coord){0, term->cursor.row}, &term->cursor); term, &(struct coord){0, term->cursor.row}, &term->cursor);
term->print_needs_wrap = false;
break; break;
case 2: case 2:
@ -482,6 +487,7 @@ csi_dispatch(struct terminal *term, uint8_t final)
term, term,
&(struct coord){0, term->cursor.row}, &(struct coord){0, term->cursor.row},
&(struct coord){term->cols - 1, term->cursor.row}); &(struct coord){term->cols - 1, term->cursor.row});
term->print_needs_wrap = false;
break; break;
default: default:
@ -552,6 +558,7 @@ csi_dispatch(struct terminal *term, uint8_t final)
term, term,
&(struct coord){term->cursor.col + remaining, term->cursor.row}, &(struct coord){term->cursor.col + remaining, term->cursor.row},
&(struct coord){term->cols - 1, term->cursor.row}); &(struct coord){term->cols - 1, term->cursor.row});
term->print_needs_wrap = false;
break; break;
} }
@ -578,6 +585,7 @@ csi_dispatch(struct terminal *term, uint8_t final)
term, term,
&term->cursor, &term->cursor,
&(struct coord){term->cursor.col + count - 1, term->cursor.row}); &(struct coord){term->cursor.col + count - 1, term->cursor.row});
term->print_needs_wrap = false;
break; break;
} }
@ -598,6 +606,7 @@ csi_dispatch(struct terminal *term, uint8_t final)
term, term,
&term->cursor, &term->cursor,
&(struct coord){term->cursor.col + count - 1, term->cursor.row}); &(struct coord){term->cursor.col + count - 1, term->cursor.row});
term->print_needs_wrap = false;
break; break;
} }