Fix blank powerline with startup buffers in some circumstances

This commit is contained in:
syl20bnr 2015-01-27 22:34:57 -05:00
parent 4f24035d9b
commit 425bf2331e

View file

@ -1806,11 +1806,13 @@ which require an initialization must be listed explicitly in the list.")
(defun spacemacs//set-powerline-for-startup-buffers ()
"Set the powerline for buffers created when Emacs starts."
(dolist (buffer '("*Messages*" "*spacemacs*" "Compile-Log"))
(dolist (buffer '("*Messages*" "*spacemacs*" "*Compile-Log*"))
(when (get-buffer buffer)
(with-current-buffer buffer
(setq-local mode-line-format
'("%e" (:eval (spacemacs/mode-line-prepare))))))))
'("%e" (:eval (spacemacs/mode-line-prepare))))
(powerline-set-selected-window)
(powerline-reset)))))
(add-hook 'after-init-hook
'spacemacs//set-powerline-for-startup-buffers))))