aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Dalziel <tom_dl@hotmail.com>2024-12-14 00:43:28 +0000
committerTom Dalziel <33435574+tomdl89@users.noreply.github.com>2024-12-14 00:59:48 +0000
commit35fe630b3227bb44c54df0c4a265c3a5e151331a (patch)
treecc2435bd9df9483b7c53f0b7c70064ed5f36b1a4
parentebc78549aeb8fa334359df34f43ff355ca2ee04d (diff)
Call evil--ex-update one last time in minibuffer teardown
Fixes #1941
-rw-r--r--evil-ex.el16
1 files changed, 9 insertions, 7 deletions
diff --git a/evil-ex.el b/evil-ex.el
index f400036..db17019 100644
--- a/evil-ex.el
+++ b/evil-ex.el
@@ -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))) ?!)))
@@ -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.")