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

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

[elpa] externals/corfu f30dc71 1/2: Check that completion field is non-e


From: ELPA Syncer
Subject: [elpa] externals/corfu f30dc71 1/2: Check that completion field is non-empty
Date: Mon, 11 Oct 2021 11:57:10 -0400 (EDT)

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

    Check that completion field is non-empty
---
 corfu.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/corfu.el b/corfu.el
index 55bcc0b..ef44df8 100644
--- a/corfu.el
+++ b/corfu.el
@@ -529,10 +529,11 @@ completion began less than that number of seconds ago."
     (setq all (if-let (sort (corfu--metadata-get metadata 
'display-sort-function))
                   (funcall sort all)
                 (sort all #'corfu--sort-predicate)))
-    (setq all (corfu--move-prefix-candidates-to-front field all))
-    (when (and completing-file (not (string-suffix-p "/" field)))
-      (setq all (corfu--move-to-front (concat field "/") all)))
-    (setq all (corfu--move-to-front field all))
+    (unless (equal field "")
+      (setq all (corfu--move-prefix-candidates-to-front field all))
+      (when (and completing-file (not (string-suffix-p "/" field)))
+        (setq all (corfu--move-to-front (concat field "/") all)))
+      (setq all (corfu--move-to-front field all)))
     (list base (length all) all hl)))
 
 (defun corfu--update-candidates (str metadata pt table pred)



reply via email to

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