]> git.eshelyaron.com Git - emacs.git/commitdiff
Hide cursor based on tty frame's `cursor-type'
authorGerd Möllmann <gerd,moellmann@gmail.com>
Sun, 16 Feb 2025 16:27:58 +0000 (17:27 +0100)
committerEshel Yaron <me@eshelyaron.com>
Tue, 18 Feb 2025 08:58:54 +0000 (09:58 +0100)
* src/dispnew.c (terminal_cursor_magic): if selected-frame has
`(cursor-type . nil)' parameter.

(cherry picked from commit a51cfbbd15889ce2af59b0b1bffac8735f70f6b9)

src/dispnew.c

index 49957e98c4ff6e4e57a91beb629e6ed05d7c3678..349a415ebf94d9d440ea18125682f65d3266549f 100644 (file)
@@ -3966,6 +3966,14 @@ terminal_cursor_magic (struct frame *root, struct frame *topmost_child)
            tty_hide_cursor (FRAME_TTY (root));
        }
     }
+
+  /* Hide cursor if selected frame has (cursor-type . nil).  */
+  {
+    struct frame *sf = SELECTED_FRAME ();
+    Lisp_Object cursor = assq_no_quit (Qcursor_type, sf->param_alist);
+    if (CONSP (cursor) && NILP (XCDR (cursor)))
+      tty_hide_cursor (FRAME_TTY (root));
+  }
 }
 
 void