From 8ed723945802c2e2bbe18bb5653c6025ed14cc6b Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Tue, 2 Jul 2019 22:23:54 +0200 Subject: csi: re-set cursor when switching between alt and normal screen This forces a refresh of the "current line" pointer. --- csi.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/csi.c b/csi.c index def01848..931ff36a 100644 --- a/csi.c +++ b/csi.c @@ -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; -- cgit v1.3