aboutsummaryrefslogtreecommitdiff
path: root/evil-tests.el
diff options
context:
space:
mode:
authorAxel Forsman <axel@axelf.se>2023-01-03 11:53:38 +0100
committerTom Dalziel <tom_dl@hotmail.com>2023-08-20 23:46:23 +0100
commit433c28cb104dae506205485b87c2c13d2458f495 (patch)
tree3e1212618902835b873d0751734cc57578f40230 /evil-tests.el
parent7fb60f6126bf1e82a7e63a23a67b4b0afc6cec96 (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 ()