mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
refactor: doom-switch-frame-hook
Redesign this hook around `after-focus-change-function`, along with debouncing, to prevent it from triggering too aggressively (due to misbehaving desktop environments, elisp packages that tinker with frame focus, or accidental (and rapid) focus changes by the user). `doom-switch-{window,buffer}-hook` have also been simplified, and `doom-switch-window-hook` now will not trigger when focusing another frame (only when you switch windows *within* any one frame). This also fixes diff-hl not updating when refocusing an Emacs frame.
This commit is contained in:
@ -255,10 +255,10 @@ tell you about it. Very annoying. This prevents that."
|
||||
|
||||
(use-package! autorevert
|
||||
;; revert buffers when their files/state have changed
|
||||
:hook (focus-in . doom-auto-revert-buffers-h)
|
||||
:hook (after-save . doom-auto-revert-buffers-h)
|
||||
:hook (doom-switch-buffer . doom-auto-revert-buffer-h)
|
||||
:hook (doom-switch-window . doom-auto-revert-buffer-h)
|
||||
:hook (doom-switch-frame . doom-auto-revert-buffers-h)
|
||||
:config
|
||||
(setq auto-revert-verbose t ; let us know when it happens
|
||||
auto-revert-use-notify nil
|
||||
|
Reference in New Issue
Block a user