@codemirror/state 6.7.3 → 6.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +6 -4
- package/dist/index.js +6 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -3141,13 +3141,15 @@ class Chunk {
|
|
|
3141
3141
|
}
|
|
3142
3142
|
else {
|
|
3143
3143
|
if (newFrom == newTo) { // Try to reorder points to fit in here
|
|
3144
|
-
for (let i = value.length
|
|
3145
|
-
if ((newFrom - to[i - 1] || val.startSide - value[i - 1].endSide)
|
|
3144
|
+
for (let i = value.length; i > 0; i--) {
|
|
3145
|
+
if ((newFrom - (to[i - 1] + newPos) || val.startSide - value[i - 1].endSide) >= 0) {
|
|
3146
3146
|
value.splice(i, 0, val);
|
|
3147
|
-
from.splice(i, 0, newFrom);
|
|
3148
|
-
to.splice(i, 0, newTo);
|
|
3147
|
+
from.splice(i, 0, newFrom - newPos);
|
|
3148
|
+
to.splice(i, 0, newTo - newPos);
|
|
3149
3149
|
continue iter;
|
|
3150
3150
|
}
|
|
3151
|
+
if ((newFrom - (from[i - 1] + newPos) || val.endSide - value[i - 1].startSide) > 0)
|
|
3152
|
+
break;
|
|
3151
3153
|
}
|
|
3152
3154
|
}
|
|
3153
3155
|
// Otherwise, spill into a new layer
|
package/dist/index.js
CHANGED
|
@@ -3137,13 +3137,15 @@ class Chunk {
|
|
|
3137
3137
|
}
|
|
3138
3138
|
else {
|
|
3139
3139
|
if (newFrom == newTo) { // Try to reorder points to fit in here
|
|
3140
|
-
for (let i = value.length
|
|
3141
|
-
if ((newFrom - to[i - 1] || val.startSide - value[i - 1].endSide)
|
|
3140
|
+
for (let i = value.length; i > 0; i--) {
|
|
3141
|
+
if ((newFrom - (to[i - 1] + newPos) || val.startSide - value[i - 1].endSide) >= 0) {
|
|
3142
3142
|
value.splice(i, 0, val);
|
|
3143
|
-
from.splice(i, 0, newFrom);
|
|
3144
|
-
to.splice(i, 0, newTo);
|
|
3143
|
+
from.splice(i, 0, newFrom - newPos);
|
|
3144
|
+
to.splice(i, 0, newTo - newPos);
|
|
3145
3145
|
continue iter;
|
|
3146
3146
|
}
|
|
3147
|
+
if ((newFrom - (from[i - 1] + newPos) || val.endSide - value[i - 1].startSide) > 0)
|
|
3148
|
+
break;
|
|
3147
3149
|
}
|
|
3148
3150
|
}
|
|
3149
3151
|
// Otherwise, spill into a new layer
|