emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/hydra e228432bb6 08/46: hydra.el (hydra--hint-from-matr


From: Stefan Monnier
Subject: [elpa] externals/hydra e228432bb6 08/46: hydra.el (hydra--hint-from-matrix): Adjust for "%" in key
Date: Tue, 25 Oct 2022 22:27:20 -0400 (EDT)

branch: externals/hydra
commit e228432bb64385f67f20aa525bce56ae4e8419eb
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    hydra.el (hydra--hint-from-matrix): Adjust for "%" in key
    
    Fixes #269
---
 hydra.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hydra.el b/hydra.el
index f569615b57..d1f4ee6ff2 100644
--- a/hydra.el
+++ b/hydra.el
@@ -1078,7 +1078,8 @@ Each head must have a property max-key-len and 
max-doc-len."
                  (mapconcat (lambda (head)
                               (funcall hydra-key-doc-function
                                        (hydra-fontify-head head body) ;; key
-                                       (hydra--head-property head :max-key-len)
+                                       (let ((n (hydra--head-property head 
:max-key-len)))
+                                         (+ n (cl-count ?% (car head))))
                                        (nth 2 head) ;; doc
                                        (hydra--head-property head 
:max-doc-len)))
                             heads-in-row "| "))



reply via email to

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