]> git.eshelyaron.com Git - dotfiles.git/commitdiff
consult-push-button: Replace newlines with spaces in the button label
authorEshel Yaron <eshel@areionsec.com>
Sat, 14 May 2022 21:37:25 +0000 (00:37 +0300)
committerEshel Yaron <eshel@areionsec.com>
Sat, 14 May 2022 21:37:25 +0000 (00:37 +0300)
.emacs.d/esy.org

index 979c9d54f508d9b91178c2ac0cd3b9d52428bfc4..fc0885aba04e25fcf237ebbc14a8041d72849354 100644 (file)
@@ -1317,8 +1317,11 @@ Add the timezones of places of interest to the list of clocks shown by
                 (buttons nil))
             (while button
               (setq buttons
-                    (cons `(,(concat (truncate-string-to-width (button-label button)
-                                                               64 nil ?\s t)
+                    (cons `(,(concat (truncate-string-to-width
+                                      (string-replace "\n"
+                                                      " "
+                                                      (button-label button))
+                                      64 nil ?\s t)
                                      " "
                                      (propertize (format "[%d]" index) 'invisible t))
                             .