aboutsummaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
Diffstat (limited to 'render.c')
-rw-r--r--render.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/render.c b/render.c
index 26ca92d3..d8a26060 100644
--- a/render.c
+++ b/render.c
@@ -1645,6 +1645,19 @@ maybe_resize(struct terminal *term, int width, int height, bool force)
cursor_row,
min(term->cursor.point.col, term->cols - 1));
+ /* If in alt screen, update the saved 'normal' cursor too */
+ if (term->grid == &term->alt) {
+ int cursor_row = last_normal_row - term->normal.offset;
+
+ while (cursor_row < 0)
+ cursor_row += term->grid->num_rows;
+
+ term->alt_saved_cursor.lcf = false;
+ term->alt_saved_cursor.point.row = cursor_row;
+ term->alt_saved_cursor.point.col = min(
+ term->alt_saved_cursor.point.col, term->cols - 1);
+ }
+
term->render.last_cursor.cell = NULL;
damage_view: