fix search marker issues - splitting of items with stored rel search markers
This commit is contained in:
parent
285dc79a6b
commit
51c095ec52
@ -77,6 +77,10 @@ export const useSearchMarker = (tr, yarray, index, f) => {
|
||||
}
|
||||
fsm.rel = 0
|
||||
}
|
||||
if (fsm.rel > 0) {
|
||||
fsm.index -= fsm.rel
|
||||
fsm.rel = 0
|
||||
}
|
||||
if (!createFreshMarker) {
|
||||
// reused old marker and we moved to a different position
|
||||
prevItem.marker = false
|
||||
|
@ -289,6 +289,9 @@ export class ListIterator {
|
||||
const startLength = len
|
||||
const sm = this.type._searchMarker
|
||||
let item = this.nextItem
|
||||
if (this.index + len > this.type._length) {
|
||||
throw lengthExceeded
|
||||
}
|
||||
while (len > 0) {
|
||||
while (item && !item.deleted && item.countable && !this.reachedEnd && len > 0 && item.moved === this.currMove && item !== this.currMoveEnd) {
|
||||
if (this.rel > 0) {
|
||||
|
@ -671,6 +671,20 @@ export const testRepeatGeneratingYarrayTests6 = tc => {
|
||||
compareTestobjects(applyRandomTests(tc, arrayTransactions, 6, monitorArrayTestObject))
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {t.TestCase} tc
|
||||
*/
|
||||
export const testRepeatGeneratingYarrayTests30 = tc => {
|
||||
compareTestobjects(applyRandomTests(tc, arrayTransactions, 30, monitorArrayTestObject))
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {t.TestCase} tc
|
||||
*/
|
||||
export const testRepeatGeneratingYarrayTests35 = tc => {
|
||||
compareTestobjects(applyRandomTests(tc, arrayTransactions, 35, monitorArrayTestObject))
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {t.TestCase} tc
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user