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 hiding doesn't work with evil-mode #49

Open
Dickby opened this issue Jun 12, 2022 · 3 comments
Open

cursor hiding doesn't work with evil-mode #49

Dickby opened this issue Jun 12, 2022 · 3 comments

Comments

@Dickby
Copy link

Dickby commented Jun 12, 2022

evil-mode prevents that cursor hiding in the vundo-undo-tree buffer somehow.

@Dickby
Copy link
Author

Dickby commented Jun 13, 2022

I found that this is a well known problem with evil-mode.
Other packages are trying to work around that issue:
alexluigit/dirvish#43
jaypei/emacs-neotree#233

but really it should be resolved in evil itself.
here is the open issue emacs-evil/evil#592 .

The hack mentioned in that issue works for vundo too:
(setq-local evil-normal-state-cursor '(bar . 0))
maybe this could be added to vundo until that evil cursor problem is solved (if it ever will be).

Thanks

@geza-herman
Copy link

I solved this problem by adding ("^ \\*vundo tree\\*" . nil) to evil-buffer-regexps, so evil will completely ignore vundo's buffer.

@DeesonGao
Copy link

I solved this problem by adding ("^ \\*vundo tree\\*" . nil) to evil-buffer-regexps, so evil will completely ignore vundo's buffer.

This hack avoids the problem, but also misses the evil feature (such as leader key, or evil key binding).

The hack mentioned in that issue works for vundo too:
(setq-local evil-normal-state-cursor '(bar . 0))
maybe this could be added to vundo until that evil cursor problem is solved (if it ever will be).

I found this hack performs differently in Emacs Mac Port and Emacs Plus. In Emacs Mac Port, this hack work as expect, while in Emacs Plus, still a narrow bar lefts (It seems like Emacs Plus treat 'zero' width bar as a very narrow bar, not just nothing).

Actually, (setq-local cursor-type nil) means don't display a cursor, BUT somehow evil refreshes this variable, and don't supports just (setq-local evil-normal-state-cursor nil).

Fortunately, we can also set evil-normal-state-cursor as a "zero-argument function", So I try this hack:

(setq-local evil-normal-state-cursor '(lambda () (setq-local cursor-type nil)))

and now, it works perfectlly in both Emacs Mac Port and Emacs Plus! :-)

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

No branches or pull requests

3 participants