fix: recursive redisplay error from doom-switch-frame-hook

If a function on doom-switch-frame-hook triggered a redisplay, it could
cause infinite recursion.

Amend: 653b465c74
This commit is contained in:
Henrik Lissner
2025-04-02 06:36:27 -04:00
parent 919e658436
commit 98273b639b
2 changed files with 5 additions and 5 deletions

View File

@ -123,10 +123,9 @@ Respects `diff-hl-disable-on-remote'."
(add-hook! '(doom-escape-hook doom-switch-window-hook doom-switch-frame-hook) :append
(defun +vc-gutter-update-h (&rest _)
"Return nil to prevent shadowing other `doom-escape-hook' hooks."
(ignore (or inhibit-redisplay
(and (or (bound-and-true-p diff-hl-mode)
(bound-and-true-p diff-hl-dir-mode))
(diff-hl-update-once))))))
(ignore (and (or (bound-and-true-p diff-hl-mode)
(bound-and-true-p diff-hl-dir-mode))
(diff-hl-update-once)))))
;; UX: Update diff-hl when magit alters git state.
(when (modulep! :tools magit)
(add-hook 'magit-post-refresh-hook #'diff-hl-magit-post-refresh))