Update git-gutter when using magit
This commit is contained in:
parent
79e8a4d0e3
commit
0eabc99422
13
config.el
13
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))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user