[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/vertico 030b964: vertico--flatten-string: Handle displa
From: |
Protesilaos Stavrou |
Subject: |
[elpa] externals/vertico 030b964: vertico--flatten-string: Handle display space properties correctly |
Date: |
Wed, 19 May 2021 15:59:22 -0400 (EDT) |
branch: externals/vertico
commit 030b9644efd5c289c635ced17c73b5c72cf362f6
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
vertico--flatten-string: Handle display space properties correctly
---
vertico.el | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/vertico.el b/vertico.el
index b7a62e5..29ba089 100644
--- a/vertico.el
+++ b/vertico.el
@@ -335,11 +335,13 @@
"Flatten STR with display or invisible PROP."
(let ((end (length str)) (pos 0) (chunks))
(while (< pos end)
- (let ((next (next-single-property-change pos prop str end)))
- (if-let (val (get-text-property pos prop str))
- (when (and (eq prop 'display) (stringp val))
- (push val chunks))
- (push (substring str pos next) chunks))
+ (let ((next (next-single-property-change pos prop str end))
+ (val (get-text-property pos prop str)))
+ (cond
+ ((and val (eq prop 'display) (stringp val))
+ (push val chunks))
+ ((not (and val (eq prop 'invisible)))
+ (push (substring str pos next) chunks)))
(setq pos next)))
(apply #'concat (nreverse chunks))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/vertico 030b964: vertico--flatten-string: Handle display space properties correctly,
Protesilaos Stavrou <=