emacs-evil / evil

The extensible vi layer for Emacs.
GNU General Public License v3.0
3.39k stars 280 forks source link

Cursor does not update when switching from normal to insert state via `i` #1412

Open zane opened 3 years ago

zane commented 3 years ago

Issue type

Environment

Emacs version: GNU Emacs 27.1 (build 1, x86_64-apple-darwin20.2.0, NS appkit-2022.20 Version 11.1 (Build 20C69)) of 2021-02-01 Operating System: MacOS Big Sur (11.1) Evil version: 1.14.0 Evil installation type: Straight Graphical/Terminal: Graphical Tested in a make emacs session (see CONTRIBUTING.md): Yes

Reproduction steps

Expected behavior

Box cursor disappears. Line cursor appears.

Actual behavior

Line cursor appears, but box cursor does not disappear. This gives the appearance that normal state is still active.

Further notes

philc commented 3 years ago

Great bug report. I experienced this regression when recently updating from Emacs 26 to 27.2. I have this in my init.el:

(blink-cursor-mode -1)

The redisplay hook that @zane mentions successfully works around this (thanks @zane!).

Evil package version 20210522.2320

tomdl89 commented 3 years ago

I can't replicate this in a make emacs session in Emacs 28.0.50. Is this bug specific to Emacs 27 or am I missing something?

zane commented 3 years ago

It may well be; I haven't tried replicating it with 28.

tomdl89 commented 3 years ago

I also can't replicate this in 27.1 Anything else I could be missing?

zane commented 3 years ago

Might only occur on MacOS, or on this particular build of Emacs?

zane commented 3 years ago

Here's what it looks like:

https://user-images.githubusercontent.com/26162/121638549-2bc28300-ca59-11eb-87ef-063a49eafe07.mov

Notice how after entering insert mode with the cursor on the 'o' both the normal mode cursor and the insert mode cursor are displayed. The insert mode cursor is hiding the leftmost pixels of the 'o' character.

zane commented 3 years ago

I'm using Emacs Plus, though I think I could reproduce using Emacs Mac Port as well.