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
Using evil-emacs-state to edit a text file which is under a git repo, the cursor color is now sky blue, then save the buffer, and after buffer saving, the cursor color becomes to yellow which is for evil-normal-cursor unexpectedly.
In fact, I noticed that the invocation of kill-all-local-variables (invocation chain: after-save-hook -> diff-hl-update -> diff-hl-changes -> diff-hl-changes-buffer -> vc-call-backend -> vc-git-diff -> vc-git-command -> vc-do-command -> vc-setup-buffer -> kill-all-local-variables) caused this issue. But I still have no idea about how to fix it. I tried to append evil-refresh-cursor to after-save-hook, but does not work.
The follow steps could be used to recur the unexpected color changing simpler:
Open a a file which is under git repository in Emacs.
M-x, then eval (save-current-buffer (set-buffer (generate-new-buffer "a temp buffer")) (kill-all-local-variables)) in mini buffer.
The text was updated successfully, but these errors were encountered:
This old issue has been waiting for a response for more than one month. As no answer has been provided, we can not help further or know if the issue is still relevant. We are then closing it. Feel free to open a new issue if there is any news on this side, be sure to read this guide first and link this issue in the new one.
I had this same problem. It was related to the version-control layer being configured to use diff-hl: (version-control :variables version-control-diff-tool 'diff-hl) Dropping that variable config solved the problem me.
Using evil-emacs-state to edit a text file which is under a git repo, the cursor color is now sky blue, then save the buffer, and after buffer saving, the cursor color becomes to yellow which is for evil-normal-cursor unexpectedly.
In fact, I noticed that the invocation of
kill-all-local-variables
(invocation chain:after-save-hook -> diff-hl-update -> diff-hl-changes -> diff-hl-changes-buffer -> vc-call-backend -> vc-git-diff -> vc-git-command -> vc-do-command -> vc-setup-buffer -> kill-all-local-variables
) caused this issue. But I still have no idea about how to fix it. I tried to append evil-refresh-cursor to after-save-hook, but does not work.The follow steps could be used to recur the unexpected color changing simpler:
M-x
, then eval(save-current-buffer (set-buffer (generate-new-buffer "a temp buffer")) (kill-all-local-variables))
in mini buffer.The text was updated successfully, but these errors were encountered: