summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2021-11-24 19:54:20 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2021-11-24 19:54:20 +0100
commitb74243e322bd40781f0bb66ecee2cda7700159c4 (patch)
tree5c708740b87bfd91ad35981ade873373bd41702e
parent248f5d849c48cd6bb7c60e4b46d75db848362602 (diff)
Fix preselect computation
-rw-r--r--corfu.el7
1 files 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)