summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohannes Altmanninger <aclopte@gmail.com>2025-05-10 21:23:30 +0200
committerMaxime Coste <mawww@kakoune.org>2025-05-11 09:57:17 +1000
commit3241f1b63025ebad4f8706594acf265f0e5e9c4a (patch)
tree6cb0e306fb77aee0c7bf92f2f7f4c8d3667a370d /test
parent1de0003e292034f11d05be7ffbe366f4fc23bb76 (diff)
Test for <?> dropping selections where search wraps
Add a test covering this branch in extend_to_next_matches(): else if (new_sels.size() <= main_index) --main_index; Specifically, this test would fail if the "<=" were to be replaced with "<".
Diffstat (limited to 'test')
-rw-r--r--test/normal/search-extending-multiple-selections/cmd1
-rw-r--r--test/normal/search-extending-multiple-selections/in4
-rw-r--r--test/normal/search-extending-multiple-selections/kak_selections_desc1
3 files changed, 6 insertions, 0 deletions
diff --git a/test/normal/search-extending-multiple-selections/cmd b/test/normal/search-extending-multiple-selections/cmd
new file mode 100644
index 00000000..fe80c42f
--- /dev/null
+++ b/test/normal/search-extending-multiple-selections/cmd
@@ -0,0 +1 @@
+CC?3<ret>
diff --git a/test/normal/search-extending-multiple-selections/in b/test/normal/search-extending-multiple-selections/in
new file mode 100644
index 00000000..94ebaf90
--- /dev/null
+++ b/test/normal/search-extending-multiple-selections/in
@@ -0,0 +1,4 @@
+1
+2
+3
+4
diff --git a/test/normal/search-extending-multiple-selections/kak_selections_desc b/test/normal/search-extending-multiple-selections/kak_selections_desc
new file mode 100644
index 00000000..d89b7437
--- /dev/null
+++ b/test/normal/search-extending-multiple-selections/kak_selections_desc
@@ -0,0 +1 @@
+2.1,3.1 1.1,3.1