[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/consult 29ce1ba14b 2/2: Simplify and add comment
From: |
ELPA Syncer |
Subject: |
[elpa] externals/consult 29ce1ba14b 2/2: Simplify and add comment |
Date: |
Wed, 16 Feb 2022 19:57:22 -0500 (EST) |
branch: externals/consult
commit 29ce1ba14b578ebf28f00143e0b6280ad037029e
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Simplify and add comment
---
consult.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/consult.el b/consult.el
index d235423f6c..a71e5fd052 100644
--- a/consult.el
+++ b/consult.el
@@ -2136,12 +2136,12 @@ INHERIT-INPUT-METHOD, if non-nil the minibuffer
inherits the input method."
(dolist (item items)
(let ((cand (consult--tofu-append item idx))
(width (consult--display-width item)))
- (add-text-properties 0 (length item)
- `(multi-category
- ,(or (get-text-property 0 'multi-category
item)
- (cons cat item))
- ,@face)
- cand)
+ ;; Preserve existing `multi-category' datum of the candidate.
+ (if (get-text-property 0 'multi-category cand)
+ (when face (add-text-properties 0 (length item) face cand))
+ ;; Attach `multi-category' datum and face.
+ (add-text-properties 0 (length item)
+ `(multi-category (,cat . ,item) ,@face)
cand))
(when (> width max-width) (setq max-width width))
(push cand candidates))))
(setq idx (1+ idx)))