Skip to content

Commit 615ca1d

Browse files
committed
fix: Simplify text scale logic
1 parent a699658 commit 615ca1d

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

jcs-modeline.el

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -457,17 +457,15 @@ mouse-1: Reveal project in folder" project)
457457
;;; Text Scale
458458

459459
(defvar text-scale-mode-amount)
460+
(defvar text-scale-mode-lighter)
460461

461462
(defun jcs-modeline--render-text-scale ()
462463
"Render text-scale amount."
463-
(when-let (((and (boundp 'text-scale-mode-amount) (/= text-scale-mode-amount 0)))
464-
(ind (format (if (> text-scale-mode-amount 0)
465-
"%+d"
466-
"%-d")
467-
text-scale-mode-amount)))
468-
(format "(%s) " (propertize ind
464+
(when (and (boundp 'text-scale-mode-lighter)
465+
(/= text-scale-mode-amount 0))
466+
(format "(%s) " (propertize text-scale-mode-lighter
469467
'mouse-face 'mode-line-highlight
470-
'help-echo (concat "Text scale " ind)))))
468+
'help-echo (concat "Text scale " text-scale-mode-lighter)))))
471469

472470
;;
473471
;;; Undo

0 commit comments

Comments
 (0)