aboutsummaryrefslogtreecommitdiff
path: root/evil-tests.el
diff options
context:
space:
mode:
authorTom Dalziel <33435574+tomdl89@users.noreply.github.com>2024-04-15 12:09:33 +0200
committerGitHub <noreply@github.com>2024-04-15 12:09:33 +0200
commiteae05b5a1b2de6fe2d262a9fc0fd24e46bebc2c8 (patch)
treee4730cfc0a8a2ff52eb3b0e3bb908b649353b017 /evil-tests.el
parentf4bacddbf3e56f53dab64e2b071e743cb42e8677 (diff)
Always undo in normal state (#1888)
Diffstat (limited to 'evil-tests.el')
-rw-r--r--evil-tests.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/evil-tests.el b/evil-tests.el
index 88a8aa5..42ad06c 100644
--- a/evil-tests.el
+++ b/evil-tests.el
@@ -9816,6 +9816,20 @@ when an error stops the execution of the macro"
("``")
"alpha bravo charlie [d]elta"))))
+(ert-deftest evil-test-insert-state-undo ()
+ "Test that undo isn't lost when done from insert state."
+ :tags '(evil)
+ (skip-unless (version<= "28" emacs-version))
+ (let (evil-want-fine-undo)
+ (customize-set-variable 'evil-undo-system 'undo-redo)
+ (evil-test-buffer
+ "alpha [ ]delta"
+ (evil-define-key* 'insert 'local [f8] 'evil-undo)
+ ("icharlie" [f8] [escape])
+ "alpha[ ] delta"
+ ("\C-r")
+ "alpha [c]harlie delta")))
+
(ert-deftest evil-test-visual-update-x-selection ()
"Test `evil-visual-update-x-selection'."
:tags '(evil)