aboutsummaryrefslogtreecommitdiff
path: root/evil-tests.el
diff options
context:
space:
mode:
authorFrank Fischer <frank-fischer@shadow-soft.de>2016-02-27 16:11:42 +0100
committerFrank Fischer <frank-fischer@shadow-soft.de>2016-02-27 16:11:42 +0100
commit7b5f24fb51edddbe479e85bb01434645a71799b3 (patch)
tree1aedac5dc4f644c7ca161090592373b4ca869bb5 /evil-tests.el
parent36e4b66f3c6281bc10f628ded649b05197711602 (diff)
Do not re-expand range returned by text-objects
The range returned by text-objects must be taken literally for operators. This allows to operator on ranges that cannot correspond to visual selections, e.g. `cib` works correctly on empty parentheses.
Diffstat (limited to 'evil-tests.el')
-rw-r--r--evil-tests.el11
1 files changed, 10 insertions, 1 deletions
diff --git a/evil-tests.el b/evil-tests.el
index fbfd52e..e9cacc4 100644
--- a/evil-tests.el
+++ b/evil-tests.el
@@ -6279,7 +6279,16 @@ Below some empty line."))
"for (auto i : vector) {<
if (cond) {
do_something();
- }[\n]>}")))
+ }[\n]>}"))
+ (ert-info ("Operator on empty parentheses")
+ (evil-test-buffer
+ "a([(]))b"
+ ("cibx" [escape])
+ "a(([x]))b")
+ (evil-test-buffer
+ "a(([)])b"
+ ("cibx" [escape])
+ "a(([x]))b")))
(ert-deftest evil-test-forces-linewise-text-objects ()
"Test `evil-text-object-change-visual-type' option."