From: Robert Pluim Date: Sun, 2 Feb 2025 12:33:37 +0000 (+0100) Subject: Fix padding when using which-key-setup-side-window-right X-Git-Tag: archive/raspbian/1%30.1+1-3+rpi1^2~2^2~20^2~65 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a7f34a532cf7d99dac58bd7187f7ad82c1e4d789;p=emacs.git 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) --- diff --git a/lisp/which-key.el b/lisp/which-key.el index d33e8b1a3bb..6ae8dcbb1f0 100644 --- a/lisp/which-key.el +++ b/lisp/which-key.el @@ -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)