Add a hook to magit that notifies diff-hl

- as per the diff-hl-mode README
  If you're using a version before 2.4.0, it defines
  magit-revert-buffer-hook (or magit-not-reverted-hook),
  which we use.

  When using Magit 2.4 or newer, add this to your init script:
  (add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh)
This commit is contained in:
Mohit Thatte 2016-04-06 22:31:29 +05:30
parent 1f3ddb638c
commit 02e0c2fc41

View file

@ -392,6 +392,7 @@ indent yanked text (with prefix arg don't indent)."
;; diff-hl ;; diff-hl
(global-diff-hl-mode +1) (global-diff-hl-mode +1)
(add-hook 'dired-mode-hook 'diff-hl-dired-mode) (add-hook 'dired-mode-hook 'diff-hl-dired-mode)
(add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh)
;; easy-kill ;; easy-kill
(global-set-key [remap kill-ring-save] 'easy-kill) (global-set-key [remap kill-ring-save] 'easy-kill)