csi: re-set cursor when switching between alt and normal screen

This forces a refresh of the "current line" pointer.
This commit is contained in:
Daniel Eklöf 2019-07-02 22:23:54 +02:00
parent cc2931007c
commit 8ed7239458
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

4
csi.c
View file

@ -587,6 +587,8 @@ csi_dispatch(struct terminal *term, uint8_t final)
term->grid = &term->alt;
term->saved_cursor = term->cursor;
term_cursor_to(term, term->cursor.row, term->cursor.col);
tll_free(term->alt.damage);
tll_free(term->alt.scroll_damage);
term_erase(term, 0, term->rows * term->cols);
@ -644,6 +646,8 @@ csi_dispatch(struct terminal *term, uint8_t final)
term->cursor = term->saved_cursor;
term_cursor_to(term, term->cursor.row, term->cursor.col);
/* Should these be restored from saved values? */
term->scroll_region.start = 0;
term->scroll_region.end = term->rows;