ui/vc-gutter: fix gutter not updating after stage
When using git-gutter:stage-hunk, the gutter would be updated just before its state is changed, creating a stale diff.
This commit is contained in:
parent
47216117cc
commit
b01606e99b
1 changed files with 1 additions and 1 deletions
|
@ -62,7 +62,7 @@ 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 git-gutter-mode
|
(when (and git-gutter-mode (not git-gutter:diffinfos))
|
||||||
(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