Function: ghostel-line-mode-history-previous

ghostel-line-mode-history-previous is an interactive and natively compiled function defined in ghostel-line-mode.el.

Signature

(ghostel-line-mode-history-previous)

Documentation

Replace the input with the previous entry from history.

Key Bindings

ghostel-line-mode-map M-p

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel-line-mode.el
(defun ghostel-line-mode-history-previous ()
  "Replace the input with the previous entry from history."
  (interactive)
  (when ghostel--line-mode-history
    (let* ((len (length ghostel--line-mode-history))
           (idx (if ghostel--line-mode-history-index
                    (min (1- len) (1+ ghostel--line-mode-history-index))
                  0)))
      (setq ghostel--line-mode-history-index idx)
      (ghostel--line-mode-replace-input
       (nth idx ghostel--line-mode-history)))))