From 8b37baada7e99478d437fddcf591a199007a2182 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 31 Mar 2025 17:21:57 -0400 Subject: [PATCH] revert: refactor(evil): remove +evil--dont-move-cursor-a Turns out that the behavior this advice fixes was not fully addressed, so I'm restoring it. Revert: 4def7f359cf6 --- modules/editor/evil/config.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 19f759cdc..64abe7034 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -143,6 +143,12 @@ directives. By default, this only recognizes C directives.") (count-lines (point-min) (point-max)) (buffer-size))))) + ;; HACK: '=' moves the cursor to the beginning of selection. Disable this, + ;; since it's more disruptive than helpful. + (defadvice! +evil--dont-move-cursor-a (fn &rest args) + :around #'evil-indent + (save-excursion (apply fn args))) + ;; HACK: In vim, registers 2-9 are global. In Evil, they're buffer-local. so ;; I enforce vim's way. ;; REVIEW: PR this upstream?