Skip to content

Commit

Permalink
Fix #545: modeline is cutoff or has extra spaces at the right end dep…
Browse files Browse the repository at this point in the history
…ending on font size.

NOTE: string-pixel-width brings both accurate calculation and negative performance impacts.
  • Loading branch information
seagle0128 committed Jun 28, 2022
1 parent 4ac4ca9 commit 1d400aa
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions doom-modeline-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -1031,9 +1031,13 @@ Example:
" "
'display `((space
:align-to
(- (+ right right-fringe right-margin scroll-bar)
,(string-width
(format-mode-line (cons "" rhs-forms)))))))
(- right
,(/ (string-pixel-width
(propertize
(format-mode-line (cons "" rhs-forms))
'face 'mode-line))
(frame-char-width)
1.0)))))
rhs-forms))
(concat "Modeline:\n"
(format " %s\n %s"
Expand Down

0 comments on commit 1d400aa

Please sign in to comment.