Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call evil--ex-update one last time in minibuffer teardown #1944

Merged
merged 1 commit into from
Dec 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions evil-ex.el
Original file line number Diff line number Diff line change
Expand Up @@ -412,13 +412,6 @@ actions during Ex state."
(add-hook 'minibuffer-exit-hook #'evil-ex-teardown nil t)
(add-hook 'completion-at-point-functions #'evil-ex-completion-at-point nil t))

(defun evil-ex-teardown ()
"Deinitialize Ex minibuffer.
Clean up everything set up by `evil-ex-setup'."
(let ((runner (evil-ex-argument-handler-runner evil--ex-argument-handler)))
(when runner (funcall runner 'stop))))
(put 'evil-ex-teardown 'permanent-local-hook t)

(defsubst evil--ex-bang-p (command)
"Return non-nil if the string COMMAND has a \"!\" suffix."
(and (> (length command) 1) (eq (aref command (1- (length command))) ?!)))
Expand Down Expand Up @@ -469,6 +462,15 @@ in case of incomplete or unknown commands."
(cond ((stringp prefix) (evil-ex-echo "Incomplete command"))
((null prefix) (evil-ex-echo "Unknown command")))))))))

(defun evil-ex-teardown ()
"Deinitialize Ex minibuffer.
Clean up everything set up by `evil-ex-setup'."
;; Call ex--update one last time, in case after-change-functions are combined
(evil--ex-update nil nil nil (minibuffer-contents-no-properties))
(let ((runner (evil-ex-argument-handler-runner evil--ex-argument-handler)))
(when runner (funcall runner 'stop))))
(put 'evil-ex-teardown 'permanent-local-hook t)

(defvar-local evil--ex-echo-overlay nil
"Overlay for displaying info messages during Ex.")

Expand Down
Loading