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-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=55b0a1aa692b5a52c635ae560e69d92cf38e5cd2;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) (cherry picked from commit a7f34a532cf7d99dac58bd7187f7ad82c1e4d789) --- diff --git a/lisp/which-key.el b/lisp/which-key.el index 399aad37e02..dfc895c2576 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)