[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu ed4ef0f 3/3: Remove overlay in pre-command-hook
From: |
ELPA Syncer |
Subject: |
[elpa] externals/corfu ed4ef0f 3/3: Remove overlay in pre-command-hook |
Date: |
Thu, 25 Nov 2021 18:57:12 -0500 (EST) |
branch: externals/corfu
commit ed4ef0fe1aed50494e59a9075566b72e8dfd3925
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Remove overlay in pre-command-hook
---
corfu.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/corfu.el b/corfu.el
index 02a74e2..f67277d 100644
--- a/corfu.el
+++ b/corfu.el
@@ -779,9 +779,6 @@ there hasn't been any input, then quit."
(corfu--match-symbol-p corfu-continue-commands
this-command))))
(corfu--echo-refresh)
- (when corfu--preview-ov
- (delete-overlay corfu--preview-ov)
- (setq corfu--preview-ov nil))
(cond
;; XXX Guard against errors during candidate generation.
;; Turn off completion immediately if there are errors
@@ -829,6 +826,9 @@ there hasn't been any input, then quit."
(defun corfu--pre-command ()
"Insert selected candidate unless command is marked to continue completion."
(add-hook 'window-configuration-change-hook #'corfu-quit)
+ (when corfu--preview-ov
+ (delete-overlay corfu--preview-ov)
+ (setq corfu--preview-ov nil))
(when (and corfu-commit-predicate
(not (corfu--match-symbol-p corfu-continue-commands this-command))
(funcall corfu-commit-predicate))