[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vertico 9905c28 03/10: Ensure that completion cycling o
From: |
Protesilaos Stavrou |
Subject: |
[elpa] externals/vertico 9905c28 03/10: Ensure that completion cycling of default completion works |
Date: |
Fri, 9 Apr 2021 10:48:29 -0400 (EDT) |
branch: externals/vertico
commit 9905c28d951efb9d1f0e49db7ff3f52dd68ca3e9
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Ensure that completion cycling of default completion works
---
vertico.el | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/vertico.el b/vertico.el
index 03a2831..e2c48d4 100644
--- a/vertico.el
+++ b/vertico.el
@@ -396,6 +396,13 @@
(eq ?/ (char-before (- (point) 2)))))
(delete-region (overlay-start rfn-eshadow-overlay) (overlay-end
rfn-eshadow-overlay))))
+(defun vertico--prompt-selection ()
+ "Highlight the prompt if selected."
+ (let ((inhibit-modification-hooks t))
+ (if (or (>= vertico--index 0) (vertico--require-match))
+ (remove-text-properties (minibuffer-prompt-end) (point-max) '(face
nil))
+ (add-text-properties (minibuffer-prompt-end) (point-max) '(face
vertico-current)))))
+
(defun vertico--exhibit ()
"Exhibit completion UI."
(vertico--tidy-shadowed-file)
@@ -405,9 +412,7 @@
(vertico--update-candidates input metadata))
(vertico--display-candidates (vertico--format-candidates input metadata))
(vertico--display-count)
- (if (or (>= vertico--index 0) (vertico--require-match))
- (remove-text-properties (minibuffer-prompt-end) (point-max) '(face
nil))
- (add-text-properties (minibuffer-prompt-end) (point-max) '(face
vertico-current)))))
+ (vertico--prompt-selection)))
(defun vertico--require-match ()
"Return t if match is required."
- [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 <=
- [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, 2021/04/09
- [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