Prevent false modified indicator in modeline
Mentioned in seagle0128/doom-modeline#129 Remove advice when lewang/ws-butler#31 is merged
This commit is contained in:
parent
b5dcfd96d3
commit
d587d11653
1 changed files with 9 additions and 1 deletions
|
@ -66,7 +66,15 @@
|
|||
|
||||
(doom-modeline-def-modeline 'project
|
||||
'(bar buffer-default-directory)
|
||||
'(misc-info mu4e github debug fancy-battery " " major-mode)))
|
||||
'(misc-info mu4e github debug fancy-battery " " major-mode))
|
||||
|
||||
;; Some functions modify the buffer, causing the modeline to show a false
|
||||
;; modified state, so we try to force them to behave.
|
||||
(defun +modeline*inhibit-modification-hooks (orig-fn &rest args)
|
||||
(with-silent-modifications (apply orig-fn args)))
|
||||
(advice-add #'ws-butler-after-save :around #'+modeline*inhibit-modification-hooks)
|
||||
(add-hook 'evil-insert-state-exit-hook #'doom-modeline-update-buffer-file-name)
|
||||
(add-hook 'evil-insert-state-exit-hook #'doom-modeline-update-buffer-file-state-icon))
|
||||
|
||||
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue