]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't use selected frame in tty_set_cursor (bug#75056)
authorGerd Möllmann <gerd@gnu.org>
Wed, 29 Jan 2025 07:28:58 +0000 (08:28 +0100)
committerEshel Yaron <me@eshelyaron.com>
Thu, 30 Jan 2025 18:13:28 +0000 (19:13 +0100)
* 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

index f50f44c58ad253671c8b86103fecd3e62bd619a3..09b937a24f4ccb12a7bc50c60c7b796f8631b485 100644 (file)
@@ -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.  */