Skip to content

Commit

Permalink
Fix cursor colour
Browse files Browse the repository at this point in the history
Fixes #502. It is not necessary to refresh the cursor when changing the evil
state in a buffer that is not displayed in some window, because as soon as the
buffer is displayed somewhere, `evil-refresh-cursor` is called as part of the
`window-configuration-change-hook` or as advice to `select-window`.
  • Loading branch information
fnussbaum committed Jun 15, 2024
1 parent 3ba76c1 commit a2da991
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion evil-core.el
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,8 @@ If ARG is nil, don't display a message in the echo area.%s" name doc)
(when deactivate-current-input-method-function
(deactivate-input-method)))
(unless evil-no-display
(evil-refresh-cursor ',state)
(when (get-buffer-window (current-buffer) t)
(evil-refresh-cursor ',state))
(evil-refresh-mode-line ',state))
,@body
(run-hooks ',entry-hook)
Expand Down

0 comments on commit a2da991

Please sign in to comment.