aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Dalziel <tom_dl@hotmail.com>2022-04-13 23:06:09 +0100
committerTom Dalziel <33435574+tomdl89@users.noreply.github.com>2022-04-14 00:12:31 +0200
commit05714e8daacadb7603a05ffe81d1fbda7439a748 (patch)
tree9d32c019beea3150cab40e73c1f9dda04787a384
parent7e87b82660668cb10f1f9838ddd622abab1f7a62 (diff)
Ensure we're not in visual state if there's no ex range
fixes #1595
-rw-r--r--evil-ex.el1
-rw-r--r--evil-tests.el5
2 files changed, 6 insertions, 0 deletions
diff --git a/evil-ex.el b/evil-ex.el
index b375a74..491eef0 100644
--- a/evil-ex.el
+++ b/evil-ex.el
@@ -718,6 +718,7 @@ This function interprets special file names like # and %."
(cond
((not evil-ex-range)
(setq this-command evil-ex-command)
+ (evil-exit-visual-state)
(run-hooks 'pre-command-hook)
(call-interactively evil-ex-command)
(run-hooks 'post-command-hook))
diff --git a/evil-tests.el b/evil-tests.el
index 2836f22..b0d2ce1 100644
--- a/evil-tests.el
+++ b/evil-tests.el
@@ -8386,6 +8386,11 @@ Source
(evil-test-buffer
"5\n4\n3\n2\n1\n"
(":g/^/m0")
+ "1\n2\n3\n4\n5\n"))
+ (ert-info ("Move with global, and visual selection")
+ (evil-test-buffer
+ "<5\n4\n3\n2\n[1]>\n"
+ (":g/^/m0")
"1\n2\n3\n4\n5\n")))
(ert-deftest evil-test-write ()