@codemirror/state 6.7.3 → 6.7.5
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 +12 -0
- package/dist/index.cjs +9 -5
- package/dist/index.js +9 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 6.7.5 (2026-09-15)
|
|
2
|
+
|
|
3
|
+
### Bug fixes
|
|
4
|
+
|
|
5
|
+
Fix a range set comparison bug that could cause spurious redraws around block wrapper boundaries.
|
|
6
|
+
|
|
7
|
+
## 6.7.4 (2026-09-04)
|
|
8
|
+
|
|
9
|
+
### Bug fixes
|
|
10
|
+
|
|
11
|
+
Fix the sorting of point ranges when mapping collapses points to the same position.
|
|
12
|
+
|
|
1
13
|
## 6.7.3 (2026-09-04)
|
|
2
14
|
|
|
3
15
|
### Bug fixes
|
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
|
|
@@ -3865,8 +3867,10 @@ function compare(a, startA, b, startB, length, comparator) {
|
|
|
3865
3867
|
boundChange = false;
|
|
3866
3868
|
}
|
|
3867
3869
|
else {
|
|
3868
|
-
if (boundChange)
|
|
3870
|
+
if (boundChange) {
|
|
3869
3871
|
comparator.boundChange(pos);
|
|
3872
|
+
boundChange = false;
|
|
3873
|
+
}
|
|
3870
3874
|
if (clipEnd > pos && !sameValues(a.active, b.active))
|
|
3871
3875
|
comparator.compareRange(pos, clipEnd, a.active, b.active);
|
|
3872
3876
|
if (bounds && clipEnd < endB && (dEnd || a.openEnd(end) != b.openEnd(end)))
|
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
|
|
@@ -3861,8 +3863,10 @@ function compare(a, startA, b, startB, length, comparator) {
|
|
|
3861
3863
|
boundChange = false;
|
|
3862
3864
|
}
|
|
3863
3865
|
else {
|
|
3864
|
-
if (boundChange)
|
|
3866
|
+
if (boundChange) {
|
|
3865
3867
|
comparator.boundChange(pos);
|
|
3868
|
+
boundChange = false;
|
|
3869
|
+
}
|
|
3866
3870
|
if (clipEnd > pos && !sameValues(a.active, b.active))
|
|
3867
3871
|
comparator.compareRange(pos, clipEnd, a.active, b.active);
|
|
3868
3872
|
if (bounds && clipEnd < endB && (dEnd || a.openEnd(end) != b.openEnd(end)))
|