Fix git-gutter not updating when whole file is staged
But we don't want it triggering on git-gutter:*-hunk, because they do their own refreshing work.
This commit is contained in:
parent
003febd54c
commit
fec53f7b1d
1 changed files with 3 additions and 1 deletions
|
@ -71,7 +71,9 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'."
|
||||||
(defun +vc-gutter-update-h (&rest _)
|
(defun +vc-gutter-update-h (&rest _)
|
||||||
"Refresh git-gutter on ESC. Return nil to prevent shadowing other
|
"Refresh git-gutter on ESC. Return nil to prevent shadowing other
|
||||||
`doom-escape-hook' hooks."
|
`doom-escape-hook' hooks."
|
||||||
(when (and git-gutter-mode (not git-gutter:diffinfos))
|
(when (and git-gutter-mode
|
||||||
|
(not (memq this-command '(git-gutter:stage-hunk
|
||||||
|
git-gutter:revert-hunk))))
|
||||||
(ignore (git-gutter)))))
|
(ignore (git-gutter)))))
|
||||||
;; update git-gutter when using magit commands
|
;; update git-gutter when using magit commands
|
||||||
(advice-add #'magit-stage-file :after #'+vc-gutter-update-h)
|
(advice-add #'magit-stage-file :after #'+vc-gutter-update-h)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue