diff options
| -rw-r--r-- | evil-surround.el | 8 | ||||
| -rw-r--r-- | test/evil-surround-test.el | 15 |
2 files changed, 17 insertions, 6 deletions
diff --git a/evil-surround.el b/evil-surround.el index 305ccf5..018a5b6 100644 --- a/evil-surround.el +++ b/evil-surround.el @@ -90,12 +90,8 @@ Each item is of the form (OPERATOR . OPERATION)." (let ((map (copy-keymap minibuffer-local-map))) (define-key map ">" (lambda () (interactive) - (call-interactively 'self-insert-command) - (run-at-time nil nil - (lambda () - (when (active-minibuffer-window) - (select-window (active-minibuffer-window)) - (exit-minibuffer)))))) + (call-interactively #'self-insert-command) + (exit-minibuffer))) map) "Keymap used by `evil-surround-read-tag'.") diff --git a/test/evil-surround-test.el b/test/evil-surround-test.el index a93bd7a..2f40d4a 100644 --- a/test/evil-surround-test.el +++ b/test/evil-surround-test.el @@ -253,3 +253,18 @@ "[w]ord" ("ysiwb") "[(]word)"))) + +(ert-deftest evil-surround-tag-from-macro () + (ert-info ("tag surround in macro") + (save-window-excursion + (with-current-buffer (get-buffer-create "*evil-surround-tag-from-macro*") + (switch-to-buffer-other-window (current-buffer)) + (insert "foo\nbar\nbaz\n") + (goto-char (point-min)) + (evil-mode 1) + (turn-on-evil-surround-mode) + (execute-kbd-macro + "yse<div>f>lysit$j_") + (should + (string= "<div>$foo$</div>\nbar\nbaz\n" + (buffer-substring-no-properties (point-min) (point-max)))))))) |
