Function: ghostel--navigate-next-prompt
ghostel--navigate-next-prompt is a natively compiled function defined
in ghostel-shell.el.
Signature
(ghostel--navigate-next-prompt &optional N)
Documentation
Move point to the start of the Nth next prompt region.
Source Code
;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel-shell.el
(defun ghostel--navigate-next-prompt (&optional n)
"Move point to the start of the Nth next prompt region."
(let ((pos (point)))
(dotimes (_ (or n 1))
;; First skip past the current prompt region if we're inside one.
(let ((next (next-single-property-change pos 'ghostel-prompt)))
(when next
(if (get-text-property next 'ghostel-prompt)
;; Landed on the next prompt.
(setq pos next)
;; In a gap — find the next prompt, or stay put.
(let ((found (next-single-property-change next 'ghostel-prompt)))
(when found
(setq pos found)))))))
(when (and pos (/= pos (point)))
(goto-char pos)
(ghostel--prompt-input-start))))