Function: ghostel--apply-cursor-style

ghostel--apply-cursor-style is a natively compiled function defined in ghostel.el.

Signature

(ghostel--apply-cursor-style)

Documentation

Apply the cursor style and blink published by the native renderer.

Kept in Elisp so input modes and integrations can decide whether cursor-type should change. Reads the buffer-local ghostel--cursor-style and ghostel--cursor-blinking.

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
(defun ghostel--apply-cursor-style ()
  "Apply the cursor style and blink published by the native renderer.
Kept in Elisp so input modes and integrations can decide whether
`cursor-type' should change.  Reads the buffer-local
`ghostel--cursor-style' and `ghostel--cursor-blinking'."
  (when (and (ghostel--terminal-input-mode-p)
             (not ghostel-ignore-cursor-change))
    (setq cursor-type
		  (pcase ghostel--cursor-style
			(0 '(bar . 2))       ; bar
			(1 'box)             ; block
			(2 '(hbar . 2))      ; underline
			(3 'hollow)          ; hollow block
			('nil nil)
			(_ 'box)))
    (if (and ghostel--cursor-style ghostel--cursor-blinking)
        (ghostel--cursor-blink-start)
      (ghostel--cursor-blink-stop))))