aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--which-key.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/which-key.el b/which-key.el
index ba446a56737..529cceb40a1 100644
--- a/which-key.el
+++ b/which-key.el
@@ -1589,12 +1589,12 @@ If KEY contains any \"special keys\" defined in
1589 1589
1590(defsubst which-key--truncate-description (desc) 1590(defsubst which-key--truncate-description (desc)
1591 "Truncate DESC description to `which-key-max-description-length'." 1591 "Truncate DESC description to `which-key-max-description-length'."
1592 (let* ((last-face (get-text-property (1- (length desc)) 'face desc)) 1592 (if (and which-key-max-description-length
1593 (dots (which-key--propertize which-key-ellipsis 'face last-face))) 1593 (> (length desc) which-key-max-description-length))
1594 (if (and which-key-max-description-length 1594 (let* ((last-face (get-text-property (1- (length desc)) 'face desc))
1595 (> (length desc) which-key-max-description-length)) 1595 (dots (which-key--propertize which-key-ellipsis 'face last-face)))
1596 (concat (substring desc 0 which-key-max-description-length) dots) 1596 (concat (substring desc 0 which-key-max-description-length) dots))
1597 desc))) 1597 desc))
1598 1598
1599(defun which-key--highlight-face (description) 1599(defun which-key--highlight-face (description)
1600 "Return the highlight face for DESCRIPTION if it has one." 1600 "Return the highlight face for DESCRIPTION if it has one."