mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-27 11:09:52 +00:00
Fix: set current window after switching window.
This commit is contained in:
parent
14e4b8ba5a
commit
616fdabd8d
1 changed files with 3 additions and 3 deletions
|
@ -243,17 +243,17 @@ If STRICT-P, return nil if no project was found, otherwise return
|
|||
(force-mode-line-update))
|
||||
|
||||
(add-hook 'window-configuration-change-hook #'doom-modeline-set-selected-window)
|
||||
(add-hook 'doom-after-switch-window-hook #'doom-modeline-set-selected-window)
|
||||
(add-hook 'switch-window-finish-hook #'doom-modeline-set-selected-window)
|
||||
(with-no-warnings
|
||||
(if (not (boundp 'after-focus-change-function))
|
||||
(progn
|
||||
(add-hook 'focus-in-hook #'doom-modeline-set-selected-window)
|
||||
(add-hook 'focus-out-hook #'doom-modeline-unset-selected-window))
|
||||
(defun doom-modeline-refresh-frame ()
|
||||
(setq +doom-modeline-current-window nil)
|
||||
(setq doom-modeline-current-window nil)
|
||||
(cl-loop for frame in (frame-list)
|
||||
if (eq (frame-focus-state frame) t)
|
||||
return (setq +doom-modeline-current-window (frame-selected-window frame)))
|
||||
return (setq doom-modeline-current-window (frame-selected-window frame)))
|
||||
(force-mode-line-update))
|
||||
(add-function :after after-focus-change-function #'doom-modeline-refresh-frame)))
|
||||
|
||||
|
|
Loading…
Reference in a new issue