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

    Fix preselect computation
---
 corfu.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/corfu.el b/corfu.el
index 49548dd..ad43d5e 100644
--- a/corfu.el
+++ b/corfu.el
@@ -580,9 +580,10 @@ A scroll bar is displayed from LO to LO+BAR."
     (list base (length all) all hl corfu--metadata
           ;; Select the prompt when the input is a valid completion
           ;; and if it is not equal to the first candidate.
-          (if (and (not (equal field (car all)))
-                   (not (and completing-file (equal (concat field "/") (car 
all))))
-                   (test-completion str table pred))
+          (if (or (not all)
+                  (and (not (equal field (car all)))
+                       (not (and completing-file (equal (concat field "/") 
(car all))))
+                       (test-completion str table pred)))
               -1 0))))
 
 (defun corfu--update-candidates (str pt table pred)

Reply via email to