Fix padding when using which-key-setup-side-window-right

* lisp/which-key.el (which-key--pad-column): Insert zero padding
spaces when the description string is longer than the column
width.  (Bug#75765)
This commit is contained in:
Robert Pluim 2025-02-02 13:33:37 +01:00
parent 6d7e7899d8
commit a7f34a532c

View file

@ -2038,7 +2038,7 @@ that width."
(mapcar (pcase-lambda (`(,key ,sep ,desc ,_doc))
(concat
(format col-format key sep desc)
(make-string (- col-desc-width (string-width desc)) ?\s)))
(make-string (max (- col-desc-width (string-width desc)) 0) ?\s)))
col-keys))))
(defun which-key--partition-list (n list)