emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/corfu ddeb31a: corfu--format-candidates: No separator s


From: ELPA Syncer
Subject: [elpa] externals/corfu ddeb31a: corfu--format-candidates: No separator space if suffix is missing
Date: Mon, 8 Nov 2021 06:57:12 -0500 (EST)

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

    corfu--format-candidates: No separator space if suffix is missing
---
 corfu.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/corfu.el b/corfu.el
index 5f3f228..fbc428a 100644
--- a/corfu.el
+++ b/corfu.el
@@ -590,10 +590,11 @@ completion began less than that number of seconds ago."
         (cl-loop for c in cands collect
                  (cl-loop for s in c collect
                           (string-trim (replace-regexp-in-string "[ \t]*\n[ 
\t]*" " " s)))))
-  (let* ((cw (1+ (cl-loop for x in cands maximize (string-width (car x)))))
+  (let* ((cw (cl-loop for x in cands maximize (string-width (car x))))
          (pw (cl-loop for x in cands maximize (string-width (cadr x))))
          (pw (if (> pw 0) (1+ pw) 0))
          (sw (cl-loop for x in cands maximize (string-width (caddr x))))
+         (sw (if (> sw 0) (1+ sw) 0))
          (width (+ pw cw sw)))
     (when (< width corfu-min-width)
       (setq cw (+ cw (- corfu-min-width width))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]