diff options
| -rw-r--r-- | evil-commands.el | 2 | ||||
| -rw-r--r-- | evil-tests.el | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/evil-commands.el b/evil-commands.el index ad57b22..94b1ba7 100644 --- a/evil-commands.el +++ b/evil-commands.el @@ -3992,6 +3992,8 @@ This is the same as :%s//~/&" (deactivate-mark deactivate-mark) match markers) (when (and pattern command) + (when evil-ex-search-vim-style-regexp + (setq pattern (evil-transform-vim-style-regexp pattern))) (setq isearch-string pattern) (isearch-update-ring pattern t) (goto-char beg) diff --git a/evil-tests.el b/evil-tests.el index 028a105..65fd8f4 100644 --- a/evil-tests.el +++ b/evil-tests.el @@ -8269,7 +8269,13 @@ maybe we need one line more with some text\n") (evil-test-buffer "this\nThis\n" (":g/This/d" [return]) - "this\n"))))) + "this\n")))) + (ert-info (":global should transform vim-style regexp when appropriate") + (let ((evil-ex-search-vim-style-regexp t)) + (evil-test-buffer + "a\n1\nb\n2\nc\n3\n" + (":g/\\d/>") + "a\n 1\nb\n 2\nc\n 3\n")))) (ert-deftest evil-test-normal () "Test `evil-ex-normal'." |
