emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/vertico cc213e3: vertico--candidate: Face removal is on


From: ELPA Syncer
Subject: [elpa] externals/vertico cc213e3: vertico--candidate: Face removal is only needed if the prompt is selected
Date: Mon, 12 Jul 2021 13:57:16 -0400 (EDT)

branch: externals/vertico
commit cc213e31c7fe3084e63a0600765e1641361a4b62
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    vertico--candidate: Face removal is only needed if the prompt is selected
---
 vertico.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vertico.el b/vertico.el
index 1385f66..9c8437d 100644
--- a/vertico.el
+++ b/vertico.el
@@ -693,7 +693,6 @@ When the prefix argument is 0, the group order is reset."
 (defun vertico--candidate (&optional hl)
   "Return current candidate string with optional highlighting if HL is 
non-nil."
   (let ((content (minibuffer-contents)))
-    (vertico--remove-face 0 (length content) 'vertico-current content)
     (if (>= vertico--index 0)
         (let ((cand (nth vertico--index vertico--candidates)))
           ;;; XXX Drop the completions-common-part face which is added by 
`completion--twq-all'.
@@ -702,6 +701,8 @@ When the prefix argument is 0, the group order is reset."
           (vertico--remove-face 0 (length cand) 'completions-common-part cand)
           (concat (substring content 0 vertico--base)
                   (if hl (car (funcall vertico--highlight-function (list 
cand))) cand)))
+      ;; Remove prompt face
+      (vertico--remove-face 0 (length content) 'vertico-current content)
       content)))
 
 (defun vertico--setup ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]