diff --git a/modules/feature/evil/autoload/evil.el b/modules/feature/evil/autoload/evil.el index a04891154..98c432ae0 100644 --- a/modules/feature/evil/autoload/evil.el +++ b/modules/feature/evil/autoload/evil.el @@ -250,15 +250,6 @@ the first match on each line)." "Don't move cursor on indent." (save-excursion (apply orig-fn args))) -;;;###autoload -(defun +evil*restore-initial-state-on-windmove (orig-fn &rest args) - "Revert buffer to its initial state when switching to another window. This -prevents states from bleeding into other modes across windows." - (let ((initial-state (evil-initial-state major-mode 'normal))) - (unless (eq evil-state initial-state) - (evil-change-state initial-state))) - (apply orig-fn args)) - ;;;###autoload (defun +evil*resolve-vim-path (file-name) "Take a path and resolve any vim-like filename modifiers in it. This adds diff --git a/modules/feature/evil/config.el b/modules/feature/evil/config.el index edb65d5a1..e8215ce34 100644 --- a/modules/feature/evil/config.el +++ b/modules/feature/evil/config.el @@ -95,8 +95,6 @@ (add-hook 'after-save-hook #'+evil|save-buffer) ;; Make ESC (from normal mode) the universal escaper. See `doom-escape-hook'. (advice-add #'evil-force-normal-state :after #'doom/escape) - ;; Ensure buffer is in initial mode when we leave it and return to it. - (advice-add #'windmove-do-window-select :around #'+evil*restore-initial-state-on-windmove) ;; Don't move cursor when indenting (advice-add #'evil-indent :around #'+evil*static-reindent) ;; monkey patch `evil-ex-replace-special-filenames' to improve support for