[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vertico cb174fce71 2/2: Revert "vertico-exit: Allow nul
From: |
ELPA Syncer |
Subject: |
[elpa] externals/vertico cb174fce71 2/2: Revert "vertico-exit: Allow null completion only if explicitly requested" |
Date: |
Fri, 14 Oct 2022 06:58:10 -0400 (EDT) |
branch: externals/vertico
commit cb174fce712e6fd5592f163d772f0dbea5f4c244
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Revert "vertico-exit: Allow null completion only if explicitly requested"
This reverts commit a2e9b1b9b04c78e15cc2272a122e7005947d7308.
---
vertico.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/vertico.el b/vertico.el
index ade9a66290..77a621285e 100644
--- a/vertico.el
+++ b/vertico.el
@@ -655,6 +655,7 @@ The function is configured by BY, BSIZE, BINDEX, BPRED and
PRED."
(defun vertico--match-p (input)
"Return t if INPUT is a valid match."
(or (memq minibuffer--require-match '(nil confirm-after-completion))
+ (equal "" input) ;; Null completion, returns default value
(test-completion input minibuffer-completion-table
minibuffer-completion-predicate)
(if (eq minibuffer--require-match 'confirm)
(eq (ignore-errors (read-char "Confirm")) 13)
@@ -665,10 +666,8 @@ The function is configured by BY, BSIZE, BINDEX, BPRED and
PRED."
(interactive "P")
(when (and (not arg) (>= vertico--index 0))
(vertico-insert))
- (let ((input (minibuffer-contents-no-properties)))
- ;; Allow null completion only if explicitly requested (M-RET)
- (when (or (and arg (equal input "")) (vertico--match-p input))
- (exit-minibuffer))))
+ (when (vertico--match-p (minibuffer-contents-no-properties))
+ (exit-minibuffer)))
(defun vertico-next-group (&optional n)
"Cycle N groups forward.