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

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

[elpa] externals/corfu df64313814 1/2: Redisplay popup after preview ove


From: ELPA Syncer
Subject: [elpa] externals/corfu df64313814 1/2: Redisplay popup after preview overlay to avoid flicker
Date: Sat, 12 Feb 2022 15:57:22 -0500 (EST)

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

    Redisplay popup after preview overlay to avoid flicker
---
 corfu.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/corfu.el b/corfu.el
index 02d14308e4..b9f07674a0 100644
--- a/corfu.el
+++ b/corfu.el
@@ -448,8 +448,7 @@ The completion backend can override this with
       ;; XXX HACK: Force redisplay, otherwise the popup sometimes does not 
display content.
       (set-frame-position corfu--frame x y)
       (redisplay 'force)
-      (make-frame-visible corfu--frame))
-    (redisplay 'force)))
+      (make-frame-visible corfu--frame))))
 
 (defun corfu--popup-show (pos off width lines &optional curr lo bar)
   "Show LINES as popup at POS - OFF.
@@ -830,15 +829,17 @@ there hasn't been any input, then quit."
      ;; 3) There exist candidates => Show candidates popup.
      (corfu--candidates
       (corfu--candidates-popup beg)
+      (corfu--preview-current beg end str)
       (corfu--echo-documentation)
-      (corfu--preview-current beg end str))
+      (redisplay 'force)) ;; XXX HACK Ensure that popup is redisplayed
      ;; 4) There are no candidates & corfu-quit-no-match => Confirmation popup.
      ((and (not corfu--candidates)
            (pcase-exhaustive corfu-quit-no-match
              ('t nil)
              ('nil t)
              ('separator (seq-contains-p (car corfu--input) corfu-separator))))
-      (corfu--popup-show beg 0 8 '(#("No match" 0 8 (face italic)))))
+      (corfu--popup-show beg 0 8 '(#("No match" 0 8 (face italic))))
+      (redisplay 'force)) ;; XXX HACK Ensure that popup is redisplayed
      (t (corfu-quit)))))
 
 (defun corfu--pre-command ()



reply via email to

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