mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-27 11:09:52 +00:00
Fix: conflict with lsp-on-revert/lsp-on-change.
Don't advice doom-modeline-set-selected-window (also bad performance). And updating the buffer-file-name after selecting window in focus-in-hook (so append it to the hook, after doom-modeline-set-selected-window). See #133 and #114#issuecomment-469060334.
This commit is contained in:
parent
fb8220d47e
commit
b29e5a85e9
3 changed files with 11 additions and 6 deletions
|
@ -322,9 +322,14 @@ mouse-1: Previous buffer\nmouse-3: Next buffer"
|
||||||
(advice-add #'symbol-overlay-rename :after #'doom-modeline-update-buffer-file-name)
|
(advice-add #'symbol-overlay-rename :after #'doom-modeline-update-buffer-file-name)
|
||||||
(advice-add #'popup-create :after #'doom-modeline-update-buffer-file-name)
|
(advice-add #'popup-create :after #'doom-modeline-update-buffer-file-name)
|
||||||
(advice-add #'popup-delete :after #'doom-modeline-update-buffer-file-name)
|
(advice-add #'popup-delete :after #'doom-modeline-update-buffer-file-name)
|
||||||
(advice-add #'doom-modeline-set-selected-window :after #'doom-modeline-update-buffer-file-name)
|
|
||||||
(if (fboundp 'doom-modeline-refresh-frame)
|
(with-no-warnings
|
||||||
(advice-add #'doom-modeline-refresh-frame :after #'doom-modeline-update-buffer-file-name))
|
(if (boundp 'after-focus-change-function)
|
||||||
|
(add-function :after after-focus-change-function
|
||||||
|
(lambda ()
|
||||||
|
(when (frame-focus-state)
|
||||||
|
(doom-modeline-update-buffer-file-name))))
|
||||||
|
(add-hook 'focus-in-hook #'doom-modeline-update-buffer-file-name t)))
|
||||||
|
|
||||||
(when (>= emacs-major-version 26)
|
(when (>= emacs-major-version 26)
|
||||||
(add-variable-watcher
|
(add-variable-watcher
|
||||||
|
@ -1320,9 +1325,9 @@ mouse-2: Show help for minor mode"
|
||||||
" "))))))
|
" "))))))
|
||||||
|
|
||||||
(add-hook 'find-file-hook #'doom-modeline-update-persp-name)
|
(add-hook 'find-file-hook #'doom-modeline-update-persp-name)
|
||||||
|
(add-hook 'buffer-list-update-hook #'doom-modeline-update-persp-name)
|
||||||
(add-hook 'persp-activated-functions #'doom-modeline-update-persp-name)
|
(add-hook 'persp-activated-functions #'doom-modeline-update-persp-name)
|
||||||
(add-hook 'persp-renamed-functions #'doom-modeline-update-persp-name)
|
(add-hook 'persp-renamed-functions #'doom-modeline-update-persp-name)
|
||||||
(advice-add #'doom-modeline-set-selected-window :after #'doom-modeline-update-persp-name)
|
|
||||||
|
|
||||||
(doom-modeline-def-segment persp-name
|
(doom-modeline-def-segment persp-name
|
||||||
"The current perspective name."
|
"The current perspective name."
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Vincent Zhang <seagle0128@gmail.com>
|
;; Author: Vincent Zhang <seagle0128@gmail.com>
|
||||||
;; Homepage: https://github.com/seagle0128/doom-modeline
|
;; Homepage: https://github.com/seagle0128/doom-modeline
|
||||||
;; Version: 1.9.1
|
;; Version: 1.9.2
|
||||||
;; Package-Requires: ((emacs "25.1") (all-the-icons "1.0.0") (shrink-path "0.2.0") (eldoc-eval "0.1") (dash "2.11.0"))
|
;; Package-Requires: ((emacs "25.1") (all-the-icons "1.0.0") (shrink-path "0.2.0") (eldoc-eval "0.1") (dash "2.11.0"))
|
||||||
;; Keywords: faces mode-line
|
;; Keywords: faces mode-line
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue