diff --git a/config.el b/config.el index ed728a8..b475e82 100644 --- a/config.el +++ b/config.el @@ -116,6 +116,19 @@ ;; Additional coniguration for doom modules. ;; ----------------------------------------------------------------------------- +;; Fix git-gutter advice for magit. +(after! (:all git-gutter magit) + ;; Define a function that updates all visible buffers. + (defun +vc-gutter-update-visible-buffers-h (&rest _) + (save-excursion + (dolist (buffer (doom-visible-buffers) nil) + (with-current-buffer buffer + (+vc-gutter-update-h))))) + + ;; And add this as new advice to the magit functions. + (advice-add 'magit-stage :after #'+vc-gutter-update-visible-buffers-h) + (advice-add 'magit-unstage :after #'+vc-gutter-update-visible-buffers-h)) + ;; Disable hl-line-mode everywhere. (after! hl-line (setq global-hl-line-modes nil))