From 084c9f68be3dd5a0253fe7ead4efaf3cca0bb19a Mon Sep 17 00:00:00 2001 From: Neil Date: Wed, 4 Oct 2023 16:17:08 +1100 Subject: 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 --- test/unit/testCellBuffer.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test') 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); -- cgit v1.2.3