You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am able to work around this via setting this in user config:
(setq revert-buffer-preserve-modes t)
I found related #205 (comment), and in particular calling diff-hl-after-revert outside of after-revert-hook is not supported, so I am figuring out why it gets called this way. Could not find anything related in my user config or Spacemacs setup.
The text was updated successfully, but these errors were encountered:
It seems like the prerequisite was enabling auto-revert-tail-mode. It reuses the hook, whether that's a good idea or not, so we'll need to adapt.
I wonder whether it's a good idea to run diff-hl-after-revert every time auto-revert-tail-handler fires (supposedly it can fire quite often), but if we should revert as well, the fix would look like this:
diff --git a/diff-hl.el b/diff-hl.el
index 2a8bce5..4885b16 100644
--- a/diff-hl.el+++ b/diff-hl.el@@ -466,7 +466,8 @@ the current version of the file)."
(defun diff-hl-after-revert ()
(defvar revert-buffer-preserve-modes)
- (when revert-buffer-preserve-modes+ (when (or (not (boundp 'revert-buffer-preserve-modes))+ revert-buffer-preserve-modes)
(diff-hl-update)))
(defun diff-hl-diff-goto-hunk-1 (historic)
Otherwise, it will be this:
diff --git a/diff-hl.el b/diff-hl.el
index 2a8bce5..56f66b4 100644
--- a/diff-hl.el+++ b/diff-hl.el@@ -465,8 +465,7 @@ the current version of the file)."
(diff-hl-update))))
(defun diff-hl-after-revert ()
- (defvar revert-buffer-preserve-modes)- (when revert-buffer-preserve-modes+ (when (bound-and-true-p revert-buffer-preserve-modes)
(diff-hl-update)))
(defun diff-hl-diff-goto-hunk-1 (historic)
When
follow-mode
is enabled, I am seeing this error:I am able to work around this via setting this in user config:
I found related #205 (comment), and in particular calling
diff-hl-after-revert
outside ofafter-revert-hook
is not supported, so I am figuring out why it gets called this way. Could not find anything related in my user config or Spacemacs setup.The text was updated successfully, but these errors were encountered: