branch: externals/corfu
commit ec53e0b01ca99197dc4b73d2c7440149f2b11d8e
Author: Daniel Mendler <m...@daniel-mendler.de>
Commit: Daniel Mendler <m...@daniel-mendler.de>

    Minor optimization
---
 corfu.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/corfu.el b/corfu.el
index caf0528..05b0e54 100644
--- a/corfu.el
+++ b/corfu.el
@@ -632,9 +632,10 @@ A scroll bar is displayed from LO to LO+BAR."
                     (concat prefix
                             (make-string (- pw (string-width prefix)) ?\s)
                             cand
-                            (make-string (+ (- cw (string-width cand))
-                                            (- sw (string-width suffix)))
-                                         ?\s)
+                            (when (/= sw 0)
+                              (make-string (+ (- cw (string-width cand))
+                                              (- sw (string-width suffix)))
+                                           ?\s))
                             suffix)
                     width)))))
 

Reply via email to