emacs-evil / emacs-evil/evil

Cursor color locked in `evil-emacs-state-cursor'

Open
#370 6 comments 0 reactions 0 assignees View on GitHub
bug major
Dominant language
Emacs Lisp
Stars
3.9k
Forks
307
PR merge metrics
No merged PRs in 30d

Description

Originally reported by: **York Zhao (Bitbucket: [york](https://bitbucket.org/york), GitHub: [york](https://github.com/york))**

----------------------------------------

Hi,

"06ed09b" introduced a problem. If `evil-emacs-state-cursor` is set, the cursor color changes when switching to Evil Emacs state which is good; but, the color will be locked in whatever color specified in `evil-emacs-state-cursor` and will not change back to the original color after exited from Emacs state.

The problem is two folded, first, since there was no default cursor color in "06ed09b", there was no way for the cursor color to "change back". Second, even if we set the default cursor color, the function `evil-refresh-cursor` didn't respect the default color, i.e., it still gets the cursor color from current frame which has been changed to the color specified in `evil-emacs-state-cursor`.

I have proposed a fix and have sent a merge request at Gitorious, please take for what it's worth.

Thanks,

York

----------------------------------------
- Bitbucket: https://bitbucket.org/lyro/evil/issue/370

Contributor guide

Open the contributing guide

Research direction

Start by reading evil-refresh-cursor and the handling of evil-emacs-state-cursor, then reproduce the cursor-color change when entering and leaving Evil Emacs state. Trace how the default or original color is obtained; the issue is done when leaving Emacs state restores the prior cursor color instead of keeping the state-specific color.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs, emacs-lisp
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.