emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-30 7766ba84199: Align columns in which-key with wide characters pr


From: Eli Zaretskii
Subject: emacs-30 7766ba84199: Align columns in which-key with wide characters properly
Date: Wed, 25 Sep 2024 07:56:42 -0400 (EDT)

branch: emacs-30
commit 7766ba8419955104fb675a6f4134a8a34ea73e43
Author: Thomas Voss <mail@thomasvoss.com>
Commit: Eli Zaretskii <eliz@gnu.org>

    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
---
 lisp/which-key.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/which-key.el b/lisp/which-key.el
index 91eb05c4dc7..fb0685cd3a9 100644
--- a/lisp/which-key.el
+++ b/lisp/which-key.el
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]