Skip to content

Commit

Permalink
Half-revert 69ea5c2
Browse files Browse the repository at this point in the history
Fix cursor color stickiness when toggling emacs state.
hlissner committed May 29, 2021
1 parent 9d6a497 commit d1bed29
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions modules/editor/evil/config.el
Original file line number Diff line number Diff line change
@@ -84,10 +84,15 @@ directives. By default, this only recognizes C directives.")

;; Change the cursor color in emacs state. We do it this roundabout way
;; to ensure changes in theme doesn't break these colors.
(add-hook! '(doom-load-theme-hook doom-init-modules-hook)
(defun +evil-update-cursor-color-h ()
(put 'cursor 'evil-emacs-color (face-foreground 'warning))
(put 'cursor 'evil-normal-color (face-background 'cursor))))

(defun +evil-default-cursor-fn ()
(evil-set-cursor-color (face-background 'cursor)))
(evil-set-cursor-color (get 'cursor 'evil-normal-color)))
(defun +evil-emacs-cursor-fn ()
(evil-set-cursor-color (face-foreground 'warning)))
(evil-set-cursor-color (get 'cursor 'evil-emacs-color)))

(setq-hook! 'after-change-major-mode-hook evil-shift-width tab-width)

0 comments on commit d1bed29

Please sign in to comment.