1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00

Align columns in which-key with wide characters properly

In the case that a character takes up multple columns (such as
`…' when used as a truncation character), make sure that the
columns are still aligned properly.
* lisp/which-key.el (which-key--pad-column): Use `string-width'
instead of `length'.  (Bug#73463)

Copyright-paperwork-exempt: yes
This commit is contained in:
Thomas Voss 2024-09-25 02:17:49 +02:00 committed by Eli Zaretskii
parent bd25a98b4e
commit 7766ba8419

View File

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