Compare commits
3 Commits
v13.0.0-36
...
v13.0.0-37
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d30bf050bf | ||
|
|
cf8698f2b6 | ||
|
|
3595f14da7 |
2
package-lock.json
generated
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "13.0.0-32",
|
"version": "13.0.0-37",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yjs",
|
"name": "yjs",
|
||||||
"version": "13.0.0-36",
|
"version": "13.0.0-37",
|
||||||
"description": "A framework for real-time p2p shared editing on any data",
|
"description": "A framework for real-time p2p shared editing on any data",
|
||||||
"main": "./y.node.js",
|
"main": "./y.node.js",
|
||||||
"browser": "./y.js",
|
"browser": "./y.js",
|
||||||
|
|||||||
@@ -29,14 +29,17 @@ export default class YText extends YArray {
|
|||||||
let right = this._start
|
let right = this._start
|
||||||
let count = 0
|
let count = 0
|
||||||
while (right !== null) {
|
while (right !== null) {
|
||||||
if (count <= pos && pos < count + right._length) {
|
const rightLen = right._deleted ? 0 : (right._length - 1)
|
||||||
|
if (count <= pos && pos <= count + rightLen) {
|
||||||
const splitDiff = pos - count
|
const splitDiff = pos - count
|
||||||
right = right._splitAt(this._y, pos - count)
|
right = right._splitAt(this._y, splitDiff)
|
||||||
left = right._left
|
left = right._left
|
||||||
count += splitDiff
|
count += splitDiff
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
count += right._length
|
if (!right._deleted) {
|
||||||
|
count += right._length
|
||||||
|
}
|
||||||
left = right
|
left = right
|
||||||
right = right._right
|
right = right._right
|
||||||
}
|
}
|
||||||
|
|||||||
1
y.node.js.map
Normal file
1
y.node.js.map
Normal file
File diff suppressed because one or more lines are too long
1
y.test.js.map
Normal file
1
y.test.js.map
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user