Function: xterm--update-cursor-color

xterm--update-cursor-color is a byte-compiled function defined in xterm.el.gz.

Signature

(xterm--update-cursor-color)

Documentation

Update the cursor color for Xterm-compatible terminals.

This updates the selected frame's terminal based on the face cursor.

Source Code

;; Defined in /usr/src/emacs/lisp/term/xterm.el.gz
(defun xterm--update-cursor-color ()
  "Update the cursor color for Xterm-compatible terminals.
This updates the selected frame's terminal based on the face `cursor'."
  (if-let* ((color (color-values (face-background 'cursor)))
            (r (nth 0 color))
            (g (nth 1 color))
            (b (nth 2 color)))
      (send-string-to-terminal (format "\e]12;rgb:%04x/%04x/%04x\e\\" r g b))
    ;; The background is `unspecified' or one of its variants.  We don't
    ;; know the right cursor color to use, so fall back to the terminal
    ;; default.
    (send-string-to-terminal xterm--reset-cursor-color-escape-sequence)))