Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursor color changed unexpectedly after saving a buffer #3378

Closed
lululau opened this issue Oct 14, 2015 · 3 comments
Closed

Cursor color changed unexpectedly after saving a buffer #3378

lululau opened this issue Oct 14, 2015 · 3 comments
Labels

Comments

@lululau
Copy link
Contributor

lululau commented Oct 14, 2015

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:

  1. Open a a file which is under git repository in Emacs.
  2. M-x, then eval (save-current-buffer (set-buffer (generate-new-buffer "a temp buffer")) (kill-all-local-variables)) in mini buffer.
@StreakyCobra
Copy link
Contributor

@lululau Can you reproduce this problem on develop? I can't reproduce it, but I'm also not sure to do it correctly.

@StreakyCobra
Copy link
Contributor

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.

@aaronjszy
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants