1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-25 05:52:42 -08:00

* 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.
This commit is contained in:
Jonas Bernoulli 2026-01-13 22:19:51 +01:00
parent a9bf57155b
commit ab8b052888
No known key found for this signature in database
GPG key ID: 230C2EFBB326D927

View file

@ -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