Fix git-gutter+ refresh on Magit refresh (#13958)

This commit is contained in:
ClarityStorm 2020-09-23 20:40:45 +01:00 committed by GitHub
parent a55d6287b1
commit 497c23a0f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View file

@ -152,3 +152,7 @@ the number of conflicts detected by `smerge-mode'."
(interactive)
(setq spacemacs--smerge-ts-full-hint-toggle
(not spacemacs--smerge-ts-full-hint-toggle)))
(when (configuration-layer/package-used-p 'git-gutter+)
(defun spacemacs//git-gutter+-refresh-in-all-buffers ()
(git-gutter+-in-all-buffers (when git-gutter+-mode (git-gutter+-refresh)))))

View file

@ -205,10 +205,8 @@
(progn
;; If you enable global minor mode
(when version-control-global-margin
;; (defun spacemacs//git-gutter+-refresh-in-all-buffers ()
;; (git-gutter+-in-all-buffers (git-gutter+-refresh)))
;; (add-hook 'magit-pre-refresh-hook #'spacemacs//git-gutter+-refresh-in-all-buffers)
(add-hook 'magit-pre-refresh-hook 'git-gutter+-refresh)
(add-hook 'magit-pre-refresh-hook
#'spacemacs//git-gutter+-refresh-in-all-buffers)
(run-with-idle-timer 1 nil 'global-git-gutter+-mode))
(setq
git-gutter+-modified-sign " "