[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/which-key 08d57febc4 08/11: Don't make description long
From: |
ELPA Syncer |
Subject: |
[elpa] externals/which-key 08d57febc4 08/11: Don't make description longer than allowed when truncating |
Date: |
Thu, 11 Aug 2022 12:58:12 -0400 (EDT) |
branch: externals/which-key
commit 08d57febc4bcebc6d228c215e363a589498894da
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Don't make description longer than allowed when truncating
Truncating the description to the allowed maximal length and then
appending an ellipsis, makes the final text longer than allowed.
The length of the ellipsis has to be taken into account.
---
which-key.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/which-key.el b/which-key.el
index a2986269fd..2062a737ab 100644
--- a/which-key.el
+++ b/which-key.el
@@ -1605,8 +1605,9 @@ If KEY contains any \"special keys\" defined in
(if (floatp val) (truncate val) val))))))
(if (and max (> (length desc) max))
(let* ((last-face (get-text-property (1- (length desc)) 'face desc))
- (dots (which-key--propertize which-key-ellipsis 'face
last-face)))
- (concat (substring desc 0 max) dots))
+ (dots (which-key--propertize which-key-ellipsis
+ 'face last-face)))
+ (concat (substring desc 0 (- max (length dots))) dots))
desc)))
(defun which-key--highlight-face (description)
- [elpa] externals/which-key updated (23fc54eb80 -> 8093644032), ELPA Syncer, 2022/08/11
- [elpa] externals/which-key 783d6954bc 07/11: Support different types for which-key-max-description-length, ELPA Syncer, 2022/08/11
- [elpa] externals/which-key 08d57febc4 08/11: Don't make description longer than allowed when truncating,
ELPA Syncer <=
- [elpa] externals/which-key 245be33189 05/11: Fix vertical off-by-one error, ELPA Syncer, 2022/08/11
- [elpa] externals/which-key e993113868 09/11: Allow truncating without using any ellipsis, ELPA Syncer, 2022/08/11
- [elpa] externals/which-key fe68fe2812 06/11: Avoid unnecessary work, ELPA Syncer, 2022/08/11
- [elpa] externals/which-key 16c992f80f 02/11: Displaying just one column means pages are arranged vertically, ELPA Syncer, 2022/08/11
- [elpa] externals/which-key 2875fcdc93 10/11: Ignore .DS_Store, ELPA Syncer, 2022/08/11
- [elpa] externals/which-key d924a4a766 01/11: Calculate format string only once, ELPA Syncer, 2022/08/11
- [elpa] externals/which-key 254d6fdc2b 03/11: Don't pad beyond maximal width, ELPA Syncer, 2022/08/11
- [elpa] externals/which-key 8093644032 11/11: Merge commit 'pullreqs/343', ELPA Syncer, 2022/08/11
- [elpa] externals/which-key 5fe2d3317d 04/11: Fix horizontal off-by-one error, ELPA Syncer, 2022/08/11