From 364a6d6feee90faa1851a2f8c63302498fee1964 Mon Sep 17 00:00:00 2001 From: justbur Date: Fri, 15 Jan 2016 12:38:48 -0500 Subject: evil-core: Set evil-local-mode var to nil in disabled buffers It is possible for (evil-disabled-buffer-p) to return t, but for the evil-local-mode variable to be left as t. This means that functions that check the value of evil-local-mode wrongly assume that evil-local-mode is enabled in these buffers. One such function is evil-refresh-cursor. --- evil-core.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/evil-core.el b/evil-core.el index 71e2239..8868734 100644 --- a/evil-core.el +++ b/evil-core.el @@ -113,7 +113,11 @@ "Minor mode for setting up Evil in a single buffer." :init-value nil (cond - ((evil-disabled-buffer-p)) + ((evil-disabled-buffer-p) + ;; Don't leave the mode variable on in buffers where evil disabled, because + ;; functions that check this variable will get an incorrect result (e.g., + ;; evil-refresh-cursor). + (setq evil-local-mode nil)) (evil-local-mode (setq emulation-mode-map-alists (evil-concat-lists '(evil-mode-map-alist) -- cgit v1.0