From 80c145aff0d01044d956d069aadb737ea784cb24 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerd=20M=C3=B6llmann?= Date: Wed, 29 Jan 2025 08:28:58 +0100 Subject: [PATCH] Don't use selected frame in tty_set_cursor (bug#75056) * src/dispnew.c (tty_set_cursor): Add frmae parameter. (write_matrix): Pass to the updated frame to tty_set_cursor. (cherry picked from commit 6cf479931d1adc03661116ef827f77fdc615db22) --- src/dispnew.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/dispnew.c b/src/dispnew.c index f50f44c58ad..09b937a24f4 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -5588,10 +5588,8 @@ scrolling_window (struct window *w, int tab_line_p) ************************************************************************/ static void -tty_set_cursor (void) +tty_set_cursor (struct frame *f) { - struct frame *f = SELECTED_FRAME (); - if ((cursor_in_echo_area /* If we are showing a message instead of the mini-buffer, show the cursor for the message instead of for the @@ -5653,7 +5651,7 @@ tty_set_cursor (void) else { /* We have only one cursor on terminal frames. Use it to - display the cursor of the selected window. */ + display the cursor of the selected window of the frame. */ struct window *w = XWINDOW (FRAME_SELECTED_WINDOW (f)); if (w->cursor.vpos >= 0 /* The cursor vpos may be temporarily out of bounds @@ -5706,7 +5704,7 @@ write_matrix (struct frame *f, bool inhibit_id_p, /* Now just clean up termcap drivers and set cursor, etc. */ if (set_cursor_p) - tty_set_cursor (); + tty_set_cursor (f); } /* Do line insertions/deletions on frame F for frame-based redisplay. */ -- 2.39.5