vundo
vundo copied to clipboard
cursor hiding doesn't work with evil-mode
evil-mode prevents that cursor hiding in the vundo-undo-tree buffer somehow.
I found that this is a well known problem with evil-mode. Other packages are trying to work around that issue: https://github.com/alexluigit/dirvish/issues/43 https://github.com/jaypei/emacs-neotree/issues/233
but really it should be resolved in evil itself. here is the open issue https://github.com/emacs-evil/evil/issues/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
I solved this problem by adding ("^ \\*vundo tree\\*" . nil)
to evil-buffer-regexps
, so evil will completely ignore vundo's buffer.
I solved this problem by adding
("^ \\*vundo tree\\*" . nil)
toevil-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! :-)