branch: externals/diff-hl commit 8ed1120d6c2bbba7c3388702e66be62051875f14 Author: Dmitry Gutov <dgu...@yandex.ru> Commit: Dmitry Gutov <dgu...@yandex.ru>
Revert "Don't hook into after-revert-hook" This reverts commit c31af59cce04fdcf9d05da54a43d236a4869c251. --- diff-hl.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/diff-hl.el b/diff-hl.el index 11d9850..2c543e7 100644 --- a/diff-hl.el +++ b/diff-hl.el @@ -582,9 +582,13 @@ The value of this variable is a mode line template as in 'find-file-hook) 'diff-hl-update-once t t) (add-hook 'vc-checkin-hook 'diff-hl-update nil t) + (add-hook 'after-revert-hook 'diff-hl-update nil t) + ;; Magit does call `auto-revert-handler', but it usually + ;; doesn't do much, because `buffer-stale--default-function' + ;; doesn't care about changed VC state. ;; https://github.com/magit/magit/issues/603 (add-hook 'magit-revert-buffer-hook 'diff-hl-update nil t) - ;; Magit versions 2.0-2.3 don't use the above and call this + ;; Magit versions 2.0-2.3 don't do the above and call this ;; instead, but only when they don't call `revert-buffer': (add-hook 'magit-not-reverted-hook 'diff-hl-update nil t) (add-hook 'text-scale-mode-hook 'diff-hl-maybe-redefine-bitmaps nil t)) @@ -592,6 +596,7 @@ The value of this variable is a mode line template as in (remove-hook 'after-change-functions 'diff-hl-edit t) (remove-hook 'find-file-hook 'diff-hl-update t) (remove-hook 'vc-checkin-hook 'diff-hl-update t) + (remove-hook 'after-revert-hook 'diff-hl-update t) (remove-hook 'magit-revert-buffer-hook 'diff-hl-update t) (remove-hook 'magit-not-reverted-hook 'diff-hl-update t) (remove-hook 'text-scale-mode-hook 'diff-hl-maybe-redefine-bitmaps t)