summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2024-11-01 16:54:45 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2024-11-01 17:43:10 +0100
commita0ac2861e9c90c9faff1db56c3f3a5afeaba7298 (patch)
tree82979bc34e69ba666e8ecff7ed9a898f661a61ce
parentd20892abbc34dc4e92b9d93c157b47dd7cdfbc9e (diff)
Suffixes are always prefixed with space
-rw-r--r--corfu.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/corfu.el b/corfu.el
index 976a88e..4b61b2a 100644
--- a/corfu.el
+++ b/corfu.el
@@ -746,9 +746,10 @@ FRAME is the existing frame."
(concat
prefix (make-string (- pw (string-width prefix)) ?\s)
cand
- (make-string (max 1 (- width pw (string-width cand)
- (string-width suffix)))
- ?\s)
+ (when (> sw 0)
+ (make-string (max 0 (- width pw (string-width cand)
+ (string-width suffix)))
+ ?\s))
suffix)
width)))))