fix edge case when moving backwards from move operation

This commit is contained in:
Kevin Jahns 2022-03-30 10:07:55 +02:00
parent f65d1b8475
commit 285dc79a6b
2 changed files with 6 additions and 2 deletions

View File

@ -199,7 +199,11 @@ export class ListIterator {
return this
}
let item = this.nextItem
len += ((item && item.countable && !item.deleted && item.moved === this.currMove) ? item.length : 0) - this.rel
if (item && item.content.constructor === ContentMove) {
item = item.left
} else {
len += ((item && item.countable && !item.deleted && item.moved === this.currMove) ? item.length : 0) - this.rel
}
this.rel = 0
while (item && len > 0) {
if (item.countable && !item.deleted && item.moved === this.currMove) {

View File

@ -668,7 +668,7 @@ const compareTestobjects = cmp => {
* @param {t.TestCase} tc
*/
export const testRepeatGeneratingYarrayTests6 = tc => {
compareTestobjects(applyRandomTests(tc, arrayTransactions, 9, monitorArrayTestObject))
compareTestobjects(applyRandomTests(tc, arrayTransactions, 6, monitorArrayTestObject))
}
/**