aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasilij Schneidermann <mail@vasilij.de>2018-03-05 22:27:04 +0100
committerGitHub <noreply@github.com>2018-03-05 22:27:04 +0100
commitc3317f8d1bd60405a2c3aad372da126651a74fbe (patch)
treed215bc2912a2f604d33f72c386a876cc42d7b7e9
parent3bf198796b2d135776143eac854e8d855cd94475 (diff)
parent030b151bb9d90afff665700c3b0df54e45fcc650 (diff)
Merge pull request #1025 from emacs-evil/ex-global-case-sensitivity
:global should take into account evil-ex-search-case
-rw-r--r--evil-commands.el2
-rw-r--r--evil-tests.el23
2 files changed, 23 insertions, 2 deletions
diff --git a/evil-commands.el b/evil-commands.el
index 49d5e3c..6ae1a45 100644
--- a/evil-commands.el
+++ b/evil-commands.el
@@ -3600,7 +3600,7 @@ This is the same as :%s//~/&"
;; flag. This isn't supported currently but should be simple to add
(evil-with-single-undo
(let ((case-fold-search
- (eq (evil-ex-regex-case pattern 'smart) 'insensitive))
+ (eq (evil-ex-regex-case pattern evil-ex-search-case) 'insensitive))
(command-form (evil-ex-parse command))
(transient-mark-mode transient-mark-mode)
(deactivate-mark deactivate-mark)
diff --git a/evil-tests.el b/evil-tests.el
index 50edebd..41031cb 100644
--- a/evil-tests.el
+++ b/evil-tests.el
@@ -7344,7 +7344,28 @@ maybe we need one line more with some text\n")
(":g//d" [return])
"no 1\nno 2\nno 3\n[n]o 5\nno 6\nno 7\n"
(":v//d" [return])
- "")))
+ ""))
+ (ert-info (":global should take into account evil-ex-search-case")
+ (evil-with-both-search-modules
+ (let ((evil-ex-search-case 'sensitive))
+ (evil-test-buffer
+ "this\nThis\n"
+ (":g/this/d" [return])
+ "This\n"))
+ (let ((evil-ex-search-case 'insensitive))
+ (evil-test-buffer
+ "this\nThis\n"
+ (":g/this/d" [return])
+ ""))
+ (let ((evil-ex-search-case 'smart))
+ (evil-test-buffer
+ "this\nThis\n"
+ (":g/this/d" [return])
+ "")
+ (evil-test-buffer
+ "this\nThis\n"
+ (":g/This/d" [return])
+ "this\n")))))
(ert-deftest evil-test-normal ()
"Test `evil-ex-normal'."