diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2021-11-08 12:47:22 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2021-11-08 12:47:22 +0100 |
| commit | ddeb31afd1c73a92ba9f0908889fce28bad0f238 (patch) | |
| tree | 7914fcfd2dea7ae68a6a5a07a572f1147e09d0f9 | |
| parent | 69407ed50dc51ab6d64a885ffca510ea92da4012 (diff) | |
corfu--format-candidates: No separator space if suffix is missing
| -rw-r--r-- | corfu.el | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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)) |
