@@ -412,13 +412,6 @@ actions during Ex state."
412
412
(add-hook 'minibuffer-exit-hook #'evil-ex-teardown nil t )
413
413
(add-hook 'completion-at-point-functions #'evil-ex-completion-at-point nil t ))
414
414
415
- (defun evil-ex-teardown ()
416
- " Deinitialize Ex minibuffer.
417
- Clean up everything set up by `evil-ex-setup' ."
418
- (let ((runner (evil-ex-argument-handler-runner evil--ex-argument-handler)))
419
- (when runner (funcall runner 'stop ))))
420
- (put 'evil-ex-teardown 'permanent-local-hook t )
421
-
422
415
(defsubst evil--ex-bang-p (command )
423
416
" Return non-nil if the string COMMAND has a \" !\" suffix."
424
417
(and (> (length command) 1 ) (eq (aref command (1- (length command))) ?! )))
@@ -469,6 +462,15 @@ in case of incomplete or unknown commands."
469
462
(cond ((stringp prefix) (evil-ex-echo " Incomplete command" ))
470
463
((null prefix) (evil-ex-echo " Unknown command" )))))))))
471
464
465
+ (defun evil-ex-teardown ()
466
+ " Deinitialize Ex minibuffer.
467
+ Clean up everything set up by `evil-ex-setup' ."
468
+ ; ; Call ex--update one last time, in case after-change-functions are combined
469
+ (evil--ex-update nil nil nil (minibuffer-contents-no-properties ))
470
+ (let ((runner (evil-ex-argument-handler-runner evil--ex-argument-handler)))
471
+ (when runner (funcall runner 'stop ))))
472
+ (put 'evil-ex-teardown 'permanent-local-hook t )
473
+
472
474
(defvar-local evil--ex-echo-overlay nil
473
475
" Overlay for displaying info messages during Ex." )
474
476
0 commit comments