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

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

[elpa] externals/vertico afd1e1bb09: Use minibuffer-contents without pro


From: ELPA Syncer
Subject: [elpa] externals/vertico afd1e1bb09: Use minibuffer-contents without properties
Date: Fri, 10 Jun 2022 06:58:00 -0400 (EDT)

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

    Use minibuffer-contents without properties
---
 vertico.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/vertico.el b/vertico.el
index db55785007..d8b304f72d 100644
--- a/vertico.el
+++ b/vertico.el
@@ -602,7 +602,7 @@ The function is configured by BY, BSIZE, BINDEX, BPRED and 
PRED."
   "Exhibit completion UI."
   (let* ((buffer-undo-list t) ;; Overlays affect point position and undo list!
          (pt (max 0 (- (point) (minibuffer-prompt-end))))
-         (content (minibuffer-contents)))
+         (content (minibuffer-contents-no-properties)))
     (unless (or (input-pending-p) (equal vertico--input (cons content pt)))
       (vertico--update-candidates pt content))
     (vertico--prompt-selection)
@@ -728,7 +728,7 @@ 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 (substring (or (car-safe vertico--input) 
(minibuffer-contents)))))
+  (let ((content (substring (or (car-safe vertico--input) 
(minibuffer-contents-no-properties)))))
     (cond
      ((>= vertico--index 0)
       (let ((cand (substring (nth vertico--index vertico--candidates))))
@@ -739,8 +739,7 @@ When the prefix argument is 0, the group order is reset."
         (concat vertico--base
                 (if hl (car (funcall vertico--highlight-function (list cand))) 
cand))))
      ((and (equal content "") (or (car-safe minibuffer-default) 
minibuffer-default)))
-     (t (vertico--remove-face 0 (length content) 'vertico-current content) ;; 
Remove prompt face
-        content))))
+     (t content))))
 
 (defun vertico--setup ()
   "Setup completion UI."



reply via email to

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