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

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

[elpa] externals/corfu 32dd1f909e 2/3: Move cancellation code to corfu--


From: ELPA Syncer
Subject: [elpa] externals/corfu 32dd1f909e 2/3: Move cancellation code to corfu--pre-command
Date: Thu, 13 Oct 2022 21:57:25 -0400 (EDT)

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

    Move cancellation code to corfu--pre-command
---
 corfu.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/corfu.el b/corfu.el
index 2582ed1a71..be9b2122c9 100644
--- a/corfu.el
+++ b/corfu.el
@@ -393,6 +393,9 @@ The completion backend can override this with
 (defvar x-gtk-resize-child-frames) ;; Not present on non-gtk builds
 (defun corfu--make-frame (x y width height content)
   "Show child frame at X/Y with WIDTH/HEIGHT and CONTENT."
+  (when corfu--frame-timer
+    (cancel-timer corfu--frame-timer)
+    (setq corfu--frame-timer nil))
   (let* ((window-min-height 1)
          (window-min-width 1)
          (x-gtk-resize-child-frames
@@ -845,10 +848,6 @@ there hasn't been any input, then quit."
                (pt (- (point) beg))
                (str (buffer-substring-no-properties beg end))
                (initializing (not corfu--input)))
-    (when corfu--frame-timer
-      (cancel-timer corfu--frame-timer)
-      (setq corfu--frame-timer nil))
-    (corfu--echo-cancel corfu--echo-message)
     (cond
      ;; XXX Guard against errors during candidate generation.
      ;; Turn off completion immediately if there are errors
@@ -894,6 +893,7 @@ there hasn't been any input, then quit."
   (when corfu--preview-ov
     (delete-overlay corfu--preview-ov)
     (setq corfu--preview-ov nil))
+  (corfu--echo-cancel corfu--echo-message)
   (when (and (eq corfu-preview-current 'insert)
              (/= corfu--index corfu--preselect)
              ;; See the comment about `overriding-local-map' in 
`corfu--post-command'.



reply via email to

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