Function: evil-ex-echo

evil-ex-echo is a byte-compiled function defined in evil-ex.el.

Signature

(evil-ex-echo STRING &rest ARGS)

Documentation

Display a message after the current Ex command.

Source Code

;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-ex.el
(defun evil-ex-echo (string &rest args)
  "Display a message after the current Ex command."
  ;; Differs from minibuffer-message, which see, in that it does not
  ;; use sit-for, since it may be called in the middle of a command.
  (unless (or evil-no-display (zerop (length string)))
    (let ((string (concat " [" (apply #'format string args) "]")))
      (put-text-property 0 1 'cursor t string) ; Place cursor before message
      (put-text-property 1 (length string) 'face 'evil-ex-info string)
      (with-selected-window (minibuffer-window)
        (if evil--ex-echo-overlay
            (move-overlay evil--ex-echo-overlay (point-max) (point-max))
          (setq evil--ex-echo-overlay (make-overlay (point-max) (point-max) nil t t)))
        (add-hook 'pre-command-hook #'evil--ex-remove-echo-overlay nil t)
        (overlay-put evil--ex-echo-overlay 'after-string string)))))