tmp commit

This commit is contained in:
Kevin Jahns
2022-04-11 15:54:10 +02:00
parent a0c9235a36
commit b2b7b8c280
4 changed files with 121 additions and 22 deletions

View File

@@ -569,7 +569,7 @@ const arrayTransactions = [
const newPos = _newPosAdj + (_newPosAdj > yarray.length - len ? len : 0)
const oldContent = yarray.toArray()
yarray.moveRange(pos, pos + len - 1, newPos)
console.log(`moving range ${pos}-${pos + len} to ${newPos}`)
console.log(`moving range ${pos}-${pos + len - 1} to ${newPos}`)
const movedValues = oldContent.splice(pos, len)
oldContent.splice(pos < newPos ? newPos - len : newPos, 0, ...movedValues)
t.compareArrays(yarray.toArray(), oldContent) // we want to make sure that fastSearch markers insert at the correct position