emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/corfu 59a3037 06/16: Ensure that overlay is deleted pro


From: Protesilaos Stavrou
Subject: [elpa] externals/corfu 59a3037 06/16: Ensure that overlay is deleted properly
Date: Wed, 28 Apr 2021 14:20:02 -0400 (EDT)

branch: externals/corfu
commit 59a3037a3258118443d68e4d188bc225bbe15893
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Ensure that overlay is deleted properly
---
 corfu.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/corfu.el b/corfu.el
index a15f21c..9b98861 100644
--- a/corfu.el
+++ b/corfu.el
@@ -428,7 +428,6 @@ Set to nil in order to disable confirmation."
          (cands (funcall corfu--highlight (seq-subseq corfu--candidates start 
last)))
          (ann-cands (mapcar #'corfu--format-candidate (corfu--annotate 
metadata cands))))
     (when (>= curr 0)
-      (when corfu--overlay (delete-overlay corfu--overlay))
       (setq corfu--overlay (make-overlay beg end nil t t))
       (overlay-put corfu--overlay 'priority 1000)
       (overlay-put corfu--overlay 'window (selected-window))
@@ -480,6 +479,9 @@ Set to nil in order to disable confirmation."
 
 (defun corfu--pre-command-hook ()
   "Insert selected candidate unless keep alive command."
+  (when corfu--overlay
+    (delete-overlay corfu--overlay)
+    (setq corfu--overlay nil))
   (unless (or (< corfu--index 0) (corfu--keep-alive-p))
     (corfu--insert 'exact)))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]