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

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

[elpa] externals/ergoemacs-mode dc9c567 83/87: Add back the highlighting


From: Stefan Monnier
Subject: [elpa] externals/ergoemacs-mode dc9c567 83/87: Add back the highlighting of the end key
Date: Wed, 14 Apr 2021 18:47:13 -0400 (EDT)

branch: externals/ergoemacs-mode
commit dc9c56735d8acdf069044c483506f64a1bc40b83
Author: Matthew Fidler <514778+mattfidler@users.noreply.github.com>
Commit: Matthew Fidler <514778+mattfidler@users.noreply.github.com>

    Add back the highlighting of the end key
---
 ergoemacs-key-description.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ergoemacs-key-description.el b/ergoemacs-key-description.el
index a645bd1..ed75875 100644
--- a/ergoemacs-key-description.el
+++ b/ergoemacs-key-description.el
@@ -194,14 +194,15 @@ MOD ar the modifiers applied to the key."
       (setq ret (upcase (symbol-name key))))
      (t
       (setq ret (format "%s" key))))
+    (setq ret (concat (copy-sequence ret) " "))
     (when (and ergoemacs-display-key-use-face-p
                (not ergoemacs-display-small-symbols-for-key-modifiers))
-      (add-text-properties 0 (length ret)
+      (add-text-properties 0 (- (length ret) 1)
                            '(face ergoemacs-display-key-face)
                            ;; Need to make a copy of ret because the
                            ;; (length ret) call makes it sometimes
                            ;; immutable
-                           (copy-sequence ret)))
+                           ret))
     ret))
 
 (defun ergoemacs-key-description--modifier (mod)
@@ -350,7 +351,8 @@ KBD is the keyboard code.  LAYOUT is the layout that is 
used."
             (setq ret (format "%s%s%s" ret
                               (or (and (or ergoemacs-display-without-brackets 
ergoemacs-display-key-use-face-p) " ")
                                   (and 
ergoemacs-display-use-unicode-brackets-around-keys "")
-                                  " ") tmp)))
+                                  " ")
+                             tmp)))
           (substring ret (or (and (or ergoemacs-display-without-brackets 
ergoemacs-display-key-use-face-p) 1)
                              (and 
ergoemacs-display-use-unicode-brackets-around-keys 0)
                              1)))))))



reply via email to

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