From 1006608093fbbe19103f63fc1140b122a3904500 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Mon, 16 Mar 2020 12:00:25 +0100 Subject: alt-screen: use a custom 'saved' cursor when switching to alt screen This fixes an issue where we failed to restore the cursor correctly when exiting from the alternate screen, if the client had sent escapes to save the cursor position while inside the alternate screen. This was because we used the *same* storage for saving the cursor position through escapes, as for saving it when entering the alternate screen. Fix by using a custom variable dedicated to normal <--> alt screen switching. --- terminal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'terminal.h') diff --git a/terminal.h b/terminal.h index 90379ba1..67785399 100644 --- a/terminal.h +++ b/terminal.h @@ -486,7 +486,7 @@ void term_reverse_index(struct terminal *term); void term_arm_blink_timer(struct terminal *term); -void term_restore_cursor(struct terminal *term); +void term_restore_cursor(struct terminal *term, const struct cursor *cursor); void term_visual_focus_in(struct terminal *term); void term_visual_focus_out(struct terminal *term); -- cgit v1.3