Function: ghostel--line-mode-startup-prompt-ready-p

ghostel--line-mode-startup-prompt-ready-p is a natively compiled function defined in ghostel-line-mode.el.

Signature

(ghostel--line-mode-startup-prompt-ready-p)

Documentation

Non-nil when the cursor row shows a real prompt (OSC 133 prop or regex).

Gates the deferred startup entry so line mode skips a blank pre-prompt screen. Unlike ghostel-input-start-point, the bare cursor does not count as a prompt.

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel-line-mode.el
(defun ghostel--line-mode-startup-prompt-ready-p ()
  "Non-nil when the cursor row shows a real prompt (OSC 133 prop or regex).
Gates the deferred startup entry so line mode skips a blank pre-prompt screen.
Unlike `ghostel-input-start-point', the bare cursor does not count as a prompt."
  (when-let* ((cursor-pos ghostel--cursor-char-pos))
    (save-excursion
      (goto-char cursor-pos)
      (let ((row-start (line-beginning-position))
            (pos cursor-pos))
        (while (and (> pos row-start)
                    (not (get-text-property (1- pos) 'ghostel-prompt)))
          (setq pos (1- pos)))
        (or (and (> pos row-start)
                 (get-text-property (1- pos) 'ghostel-prompt))
            (ghostel--regex-prompt-end cursor-pos))))))