From ab8b0528884ffcc305e478d7bda5362acbef1b2e Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Tue, 13 Jan 2026 22:19:51 +0100 Subject: [PATCH] * lisp/icomplete.el (icomplete--render-vertical): Avoid trailing whitespace When a completion candidate has no suffix, then there is no need to add whitespace "between" the candidate and suffix, since there is no need to align suffixes if there are none. In this case the trailing whitespace only serves to needlessly make all candidates the same length, with the result that if one candidate does not fit one a single line, then all other candidates are made to not fit either. --- lisp/icomplete.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 975b9d5404e..6de3dd0b50a 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -1025,7 +1025,9 @@ away from the bottom. Counts wrapped lines as real lines." collect (concat prefix (make-string (max 0 (- max-prefix-len (length prefix))) ? ) (completion-lazy-hilit comp) - (make-string (max 0 (- max-comp-len (length comp))) ? ) + (and suffix + (make-string (max 0 (- max-comp-len (length comp))) + ? )) suffix) into lines-aux finally (setq lines lines-aux