aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/unit/testCellBuffer.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2023-10-04 16:17:08 +1100
committerNeil <nyamatongwe@gmail.com>2023-10-04 16:17:08 +1100
commit084c9f68be3dd5a0253fe7ead4efaf3cca0bb19a (patch)
tree011c011bb64230b1762e13f6e3fc5b2640912344 /test/unit/testCellBuffer.cxx
parent0d75d5544f21ecf2dca49af04b3467ccea4ab8db (diff)
downloadscintilla-mirror-084c9f68be3dd5a0253fe7ead4efaf3cca0bb19a.tar.gz
Significantly reduce memory used for deleting contiguous ranges backwards.
Compresses sequences of same item in vectors by adding a count field. Fixes Notepad++ issue 13442. https://github.com/notepad-plus-plus/notepad-plus-plus/issues/13442
Diffstat (limited to 'test/unit/testCellBuffer.cxx')
-rw-r--r--test/unit/testCellBuffer.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/unit/testCellBuffer.cxx b/test/unit/testCellBuffer.cxx
index f7795c9e7..690611d2f 100644
--- a/test/unit/testCellBuffer.cxx
+++ b/test/unit/testCellBuffer.cxx
@@ -586,14 +586,14 @@ TEST_CASE("ChangeHistory") {
REQUIRE(il.DeletionCount(0, 2) == 0);
il.DeleteRangeSavingHistory(1, 1, true, false);
REQUIRE(il.DeletionCount(0,2) == 1);
- const EditionSet at1 = {2};
+ const EditionSet at1 = { {2, 1} };
REQUIRE(il.DeletionsAt(1) == at1);
il.DeleteRangeSavingHistory(1, 1, false, false);
REQUIRE(il.DeletionCount(0,1) == 2);
- const EditionSet at2 = { 2, 3 };
+ const EditionSet at2 = { {2, 1}, {3, 1} };
REQUIRE(il.DeletionsAt(1) == at2);
il.DeleteRangeSavingHistory(0, 1, false, false);
- const EditionSet at3 = { 2, 3, 3 };
+ const EditionSet at3 = { {2, 1}, {3, 2} };
REQUIRE(il.DeletionsAt(0) == at3);
REQUIRE(il.DeletionCount(0,0) == 3);