branch: externals/vertico
commit 95f5a4c3737215c180d0ba3fa87bc828fd182830
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
Minor cleanup
---
vertico.el | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/vertico.el b/vertico.el
index d33062d6d7..5d0fdb3a87 100644
--- a/vertico.el
+++ b/vertico.el
@@ -248,12 +248,11 @@ The function is configured by BY, BSIZE, BINDEX, BPRED
and PRED."
(plist-get completion-extra-properties
:annotation-function)))
(cl-loop for cand in cands collect
(let ((suffix (or (funcall ann cand) "")))
- (list cand ""
- ;; The default completion UI adds the
`completions-annotations' face
- ;; if no other faces are present.
- (if (text-property-not-all 0 (length suffix) 'face
nil suffix)
- suffix
- (propertize suffix 'face
'completions-annotations)))))
+ ;; The default completion UI adds the
`completions-annotations' face
+ ;; if no other faces are present.
+ (unless (text-property-not-all 0 (length suffix) 'face nil
suffix)
+ (setq suffix (propertize suffix 'face
'completions-annotations)))
+ (list cand "" suffix)))
(cl-loop for cand in cands collect (list cand "" "")))))
(defun vertico--move-to-front (elem list)