aboutsummaryrefslogtreecommitdiff
path: root/evil-tests.el
diff options
context:
space:
mode:
authorAxel Forsman <axel@axelf.se>2023-01-03 11:53:38 +0100
committerAxel Forsman <axelsfor@gmail.com>2023-08-09 11:23:05 +0200
commit26db9441a13ebedb2481d7ada4c3b5e60ec22795 (patch)
treed533563038cf9896e57d84d68e137654f4cbf6b7 /evil-tests.el
parent6e30037fdc6a275d78d6b82d89bd8e47bcf4d4e3 (diff)
Stop the '</'> and '[/'] marks from intertwining
The function evil-visual-paste would assign to evil-visual-point/-mark the same markers used by the '[ and '] marks. Therefore, after a single visual paste Normal mode "gv" would act funkily in that buffer ever after. To reproduce: * Enter a new buffer with the contents: x y * With the cursor on "x", type "ylvpjxgv". The expectation is that "x" should be re-selected. Instead the empty lower line is selected due to it being the previously changed text. This commit fixes this, and also removes unused definitions related to evil-visual-previous-point/-mark.
Diffstat (limited to 'evil-tests.el')
-rw-r--r--evil-tests.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/evil-tests.el b/evil-tests.el
index b043762..7d8bc9d 100644
--- a/evil-tests.el
+++ b/evil-tests.el
@@ -7436,6 +7436,12 @@ charlie delta
<echo foxtrot
golf h[o]>tel")))
+(ert-deftest evil-test-visual-separate-from-operator-marks ()
+ "Test that visual selection is kept separate from the '[ and '] marks (#1744)."
+ (evil-test-buffer "x\ny"
+ ("ylvpjxgv")
+ "[x]\n"))
+
;;; Replace state
(ert-deftest evil-test-replacement ()