Skip to content

Commit

Permalink
perf: improve check segment
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangou committed Apr 7, 2024
1 parent 60f8b34 commit 745cf51
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions doom-modeline-segments.el
Original file line number Diff line number Diff line change
Expand Up @@ -1009,12 +1009,18 @@ level."
(concat
(doom-modeline-spc)
(let ((str))
(dolist (s (split-string seg ""))
(dolist (s (split-string seg " "))
(setq str
(concat str (if (string-match-p "^[0-9]+$" s)
(doom-modeline-display-text s)
(doom-modeline-display-icon s)))))
str)
(concat str
(if (string-match-p "^[0-9]+$" s)
(concat (doom-modeline-vspc)
(doom-modeline-display-text s)
(doom-modeline-vspc))
(doom-modeline-display-icon s)))))
(propertize str
'help-echo (get-text-property 1 'help-echo seg)
'mouse-face (get-text-property 1 'mouse-face seg)
'local-map (get-text-property 1 'local-map seg)))
(doom-modeline-spc))))


Expand Down

0 comments on commit 745cf51

Please sign in to comment.