Skip to content

Commit

Permalink
(core): Fix modeline gets truncated on the tty
Browse files Browse the repository at this point in the history
  • Loading branch information
mohkale committed Dec 27, 2020
1 parent af5f618 commit c536b64
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doom-modeline-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,13 @@ then this function does nothing."
(add-hook 'after-setting-font-hook #'doom-modeline-refresh-font-width-cache)
(add-hook 'server-after-make-frame-hook #'doom-modeline-refresh-font-width-cache)

(add-hook 'window-configuration-change-hook
(defun doom-modeline-update-window-is-right-most ()
(dolist (window (window-list))
(set-window-parameter
window 'right-most
(not (window-in-direction 'right window))))))

(defun doom-modeline-def-modeline (name lhs &optional rhs)
"Defines a modeline format and byte-compiles it.
NAME is a symbol to identify it (used by `doom-modeline' for retrieval).
Expand All @@ -949,6 +956,7 @@ Example:
'display `((space
:align-to
(- (+ right right-fringe right-margin)
,(if (window-parameter (selected-window) 'right-most) 0 1)
,(* (let ((width (doom-modeline--font-width)))
(or (and (= width 1) 1)
(/ width (frame-char-width) 1.0)))
Expand Down

0 comments on commit c536b64

Please sign in to comment.