mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 19:19:50 +00:00
Fix #149: (setq doom-modeline-icon 1) fails and hangs emacs daemon.
This commit is contained in:
parent
04ed6ec68f
commit
88459ee106
1 changed files with 11 additions and 0 deletions
|
@ -213,6 +213,17 @@ buffer where knowing the current project directory is important."
|
|||
(add-hook 'clone-indirect-buffer-hook #'doom-modeline-update-buffer-file-icon)
|
||||
|
||||
(when (>= emacs-major-version 26)
|
||||
(add-variable-watcher
|
||||
'doom-modeline-icon
|
||||
(lambda (_sym val op _where)
|
||||
(when (eq op 'set)
|
||||
(setq doom-modeline-icon val)
|
||||
;; Fix #149: hang while changing `doom-modeline-icon' from nil to t
|
||||
(if (and doom-modeline-icon
|
||||
(not (featurep 'all-the-icons)))
|
||||
(require 'all-the-icons))
|
||||
(doom-modeline-update-buffer-file-icon))))
|
||||
|
||||
(add-variable-watcher
|
||||
'all-the-icons-scale-factor
|
||||
(lambda (_sym val op _where)
|
||||
|
|
Loading…
Reference in a new issue