[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vertico 6f6d345 02/10: vertico--recompute-candidates: M
From: |
Protesilaos Stavrou |
Subject: |
[elpa] externals/vertico 6f6d345 02/10: vertico--recompute-candidates: Move directory to the top if it matches input |
Date: |
Fri, 9 Apr 2021 10:48:28 -0400 (EDT) |
branch: externals/vertico
commit 6f6d345cb19e24df7a86ca9a485f4e1b9ddc766d
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
vertico--recompute-candidates: Move directory to the top if it matches input
---
vertico.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/vertico.el b/vertico.el
index 4d8e2bb..03a2831 100644
--- a/vertico.el
+++ b/vertico.el
@@ -255,15 +255,19 @@
(prog1 (cdr last)
(setcdr last nil))
0))
+ (iab (vertico--input-after-boundary input))
(def (or (car-safe minibuffer-default) minibuffer-default))
(total (length all)))
(when (<= total vertico-sort-threshold)
(setq all (if-let (sort (completion-metadata-get metadata
'display-sort-function))
(funcall sort all)
(vertico--sort input all))))
+ ;; Move special candidates: "input" appears at the top, before "input/",
before default value
(when (stringp def)
(setq all (vertico--move-to-front def all)))
- (setq all (vertico--move-to-front (vertico--input-after-boundary input)
all))
+ (when (and minibuffer-completing-file-name (not (string-suffix-p "/" iab)))
+ (setq all (vertico--move-to-front (concat iab "/") all)))
+ (setq all (vertico--move-to-front iab all))
(when-let (group (completion-metadata-get metadata 'x-group-function))
(setq all (mapcan #'cdr (funcall group all))))
(list base total all)))
@@ -453,7 +457,7 @@
(unless arg (vertico-insert))
(let ((input (minibuffer-contents-no-properties)))
(if (or (memq minibuffer--require-match '(nil confirm-after-completion))
- (equal "" input)
+ (equal "" input) ;; The questionable null completion
(test-completion input
minibuffer-completion-table
minibuffer-completion-predicate)
- [elpa] externals/vertico updated (1fc43bb -> f48679b), Protesilaos Stavrou, 2021/04/09
- [elpa] externals/vertico fe0eb1e 01/10: Change prompt selection again, Protesilaos Stavrou, 2021/04/09
- [elpa] externals/vertico 9905c28 03/10: Ensure that completion cycling of default completion works, Protesilaos Stavrou, 2021/04/09
- [elpa] externals/vertico 3b54a1c 04/10: README: Document default completion bindings, Protesilaos Stavrou, 2021/04/09
- [elpa] externals/vertico 9c8f91f 05/10: README: Generate vertico.texi, Protesilaos Stavrou, 2021/04/09
- [elpa] externals/vertico c9d7c18 07/10: Update the candidates when moving the point, Protesilaos Stavrou, 2021/04/09
- [elpa] externals/vertico 5a9af18 06/10: Do not extend the prompt highlighting (See #7), Protesilaos Stavrou, 2021/04/09
- [elpa] externals/vertico 6f6d345 02/10: vertico--recompute-candidates: Move directory to the top if it matches input,
Protesilaos Stavrou <=
- [elpa] externals/vertico 61f799f 08/10: Compute completion boundaries only once (Optimization), Protesilaos Stavrou, 2021/04/09
- [elpa] externals/vertico f48679b 10/10: Remove Consult integration, which has been moved to Consult, Protesilaos Stavrou, 2021/04/09
- [elpa] externals/vertico 69fd917 09/10: Remove Embark integration, which has been moved to Embark, Protesilaos Stavrou, 2021/04/09