From 78f55f3a45a1b3d328e9727a647f9d83f3020a15 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 15 May 2025 19:02:27 +0200 Subject: [PATCH] fix(magit): update diff-hl on revert Not a complete fix, because +vc-gutter-update-h isn't aggressive or responsive enough to changes in VC in buffers that haven't changed, but I'll address that later. --- modules/tools/magit/autoload.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/tools/magit/autoload.el b/modules/tools/magit/autoload.el index 6301fa13d..cd05fd061 100644 --- a/modules/tools/magit/autoload.el +++ b/modules/tools/magit/autoload.el @@ -117,7 +117,9 @@ window that already exists in that direction. It will split otherwise." (cl-incf magit-auto-revert-counter) (when (bound-and-true-p vc-mode) (let ((vc-follow-symlinks t)) - (vc-refresh-state))) + (vc-refresh-state)) + (when (fboundp '+vc-gutter-update-h) + (+vc-gutter-update-h))) (when (and (not (get-buffer-process buffer)) (funcall buffer-stale-function t)) (revert-buffer t t t))