Skip to content

Commit

Permalink
Refresh the mode-line of the current buffer while toggling.
Browse files Browse the repository at this point in the history
  • Loading branch information
seagle0128 committed Apr 6, 2020
1 parent bead0d0 commit 8c71b43
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doom-modeline.el
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ So it can be restored when `doom-modeline-mode' is disabled.")
(if doom-modeline-mode
(progn
(doom-modeline-refresh-bars) ; Create bars
(doom-modeline-set-main-modeline) ; Set mode-line for current buffer
(doom-modeline-set-main-modeline t) ; Set default mode-line

;; These buffers are already created and don't get modelines
Expand Down Expand Up @@ -272,6 +273,7 @@ So it can be restored when `doom-modeline-mode' is disabled.")
(advice-add #'helm-display-mode-line :after #'doom-modeline-set-helm-modeline))
(progn
;; Restore mode-line
(setq mode-line-format doom-modeline--default-format)
(setq-default mode-line-format doom-modeline--default-format)
(dolist (bname '("*scratch*" "*Messages*"))
(if (buffer-live-p (get-buffer bname))
Expand Down

0 comments on commit 8c71b43

Please sign in to comment.