diff options
| author | fnussbaum <ferdinand.nussbaum@inf.ethz.ch> | 2025-01-10 20:33:35 +0100 |
|---|---|---|
| committer | Tom Dalziel <33435574+tomdl89@users.noreply.github.com> | 2025-01-11 09:20:26 +0000 |
| commit | 5774d0df754fbd32054bec65455652cc2f965d79 (patch) | |
| tree | d3b478d4f98713aee6126a18cd13623b8890b498 /evil-commands.el | |
| parent | 6bed0e58dbafd75755c223a5c07aacd479386568 (diff) | |
Allow `evil-undo` in visual state again (undo in region)
Undo in region can be very useful and is supported by all undo backends.
Before #1888, `evil-undo` stayed in visual state, and I think restoring this
behaviour should not negatively affect the fix for #1883.
Diffstat (limited to 'evil-commands.el')
| -rw-r--r-- | evil-commands.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/evil-commands.el b/evil-commands.el index 11566cb..0f2bc84 100644 --- a/evil-commands.el +++ b/evil-commands.el @@ -1764,9 +1764,9 @@ Add (add-hook 'evil-local-mode-hook 'turn-on-undo-tree-mode) to your init file f (interactive "*p") (evil--check-undo-system) (let ((state-before evil-state)) - (unless (eq 'normal state-before) (evil-normal-state)) + (unless (memq state-before '(normal visual)) (evil-normal-state)) (funcall evil-undo-function count) - (unless (eq 'normal state-before) (evil-change-state state-before)))) + (unless (memq state-before '(normal visual)) (evil-change-state state-before)))) (evil-define-command evil-redo (count) "Undo COUNT changes in buffer using `evil-redo-function'." |
