diff --git a/evil-commands.el b/evil-commands.el index 7938b93a..e3af076f 100644 --- a/evil-commands.el +++ b/evil-commands.el @@ -1753,6 +1753,7 @@ Add (add-hook 'evil-local-mode-hook 'turn-on-undo-tree-mode) to your init file f (evil-define-command evil-undo (count) "Undo COUNT changes in buffer using `evil-undo-function'." :repeat abort + :jump t (interactive "*p") (evil--check-undo-system) (funcall evil-undo-function count)) diff --git a/evil-tests.el b/evil-tests.el index 259c6ff9..f22a6694 100644 --- a/evil-tests.el +++ b/evil-tests.el @@ -9779,6 +9779,20 @@ when an error stops the execution of the macro" ("uu") "line 1\n[l]ine 2\nline 3"))) +(ert-deftest evil-test-undo-jump () + "Test that undo adds to the jump list." + :tags '(evil) + (let ((evil--jumps-buffer-targets "\\*\\(new\\|scratch\\|test\\)\\*")) + (ert-info ("Undo adds to the jump list") + (evil-test-buffer + "alpha [b]ravo charlie delta" + ("dw" "w") + "alpha charlie [d]elta" + ("u") + "alpha [b]ravo charlie delta" + ("``") + "alpha bravo charlie [d]elta")))) + (ert-deftest evil-test-visual-update-x-selection () "Test `evil-visual-update-x-selection'." :tags '(evil)