From c48a5e5f9c2fd171e6a714840992c6370d5f4528 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 23 Jun 2024 15:18:41 -0400 Subject: [PATCH] fix(god): cursor color change If the cursor's color changed from A to B, it didn't change back. Close: #7841 Amend: #7049 Co-authored-by: darth10 --- modules/editor/god/autoload.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/editor/god/autoload.el b/modules/editor/god/autoload.el index 5902d468f..cb1eee081 100644 --- a/modules/editor/god/autoload.el +++ b/modules/editor/god/autoload.el @@ -13,7 +13,7 @@ (defun +god--configure-cursor-and-modeline-h () "Configure cursor type, cursor color and doom-modeline bar color depending on mode." (let* ((is-fill-overflow (> (current-column) fill-column)) - (previous-cursor-color (face-background 'cursor)) + (previous-cursor-color (frame-parameter nil 'cursor-color)) (previous-modeline-color (and (facep 'doom-modeline-bar) (face-background 'doom-modeline-bar))) (is-god-mode (bound-and-true-p god-local-mode)) @@ -26,7 +26,7 @@ (cond (buffer-read-only +god-read-only-mode-color) (is-fill-overflow +god-fill-overflow-color) (overwrite-mode +god-overwrite-mode-color) - (t previous-cursor-color)))) + ((or previous-cursor-color (face-background 'cursor)))))) (setq cursor-type next-cursor-type) (unless (eq previous-cursor-color next-cursor-and-modeline-color) (set-cursor-color next-cursor-and-modeline-color))