summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2022-01-08 19:47:36 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2022-01-08 19:47:36 +0100
commitf8d337f1053578a88a18bb23ff44095fc85481c0 (patch)
tree720ed13a0a39841ad115588908839add70608229
parent6d81371db5c162c74a7971229f8029d5c60cf4a5 (diff)
Minor cleanup
-rw-r--r--corfu.el13
1 files changed, 6 insertions, 7 deletions
diff --git a/corfu.el b/corfu.el
index 66ad227..ad90667 100644
--- a/corfu.el
+++ b/corfu.el
@@ -649,13 +649,12 @@ there hasn't been any input, then quit."
(plist-get corfu--extra :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. We use a custom `corfu-annotations'
- ;; face to allow further styling which fits better for popups.
- (if (text-property-not-all 0 (length suffix) 'face nil suffix)
- suffix
- (propertize suffix 'face 'corfu-annotations)))))
+ ;; The default completion UI adds the `completions-annotations' face
+ ;; if no other faces are present. We use a custom `corfu-annotations'
+ ;; face to allow further styling which fits better for popups.
+ (unless (text-property-not-all 0 (length suffix) 'face nil suffix)
+ (setq suffix (propertize suffix 'face 'corfu-annotations)))
+ (list cand "" suffix)))
(cl-loop for cand in cands collect (list cand "" "")))))
(let* ((dep (plist-get corfu--extra :company-deprecated))
(completion-extra-properties corfu--extra)