@codemirror/view 6.43.5 → 6.43.6

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 CHANGED
@@ -1,3 +1,9 @@
1
+ ## 6.43.6 (2026-07-06)
2
+
3
+ ### Bug fixes
4
+
5
+ Fix another tile tree corruption bug that could occur on zero-length content updates.
6
+
1
7
  ## 6.43.5 (2026-07-04)
2
8
 
3
9
  ### Bug fixes
package/dist/index.cjs CHANGED
@@ -2738,7 +2738,7 @@ class TileUpdate {
2738
2738
  }
2739
2739
  emit(from, to) {
2740
2740
  let pendingLineAttrs = null;
2741
- let b = this.builder, markCount = 0;
2741
+ let b = this.builder, markCount = -1;
2742
2742
  let openEnd = state.RangeSet.spans(this.decorations, from, to, {
2743
2743
  point: (from, to, deco, active, openStart, index) => {
2744
2744
  if (deco instanceof PointDecoration) {
@@ -2792,7 +2792,8 @@ class TileUpdate {
2792
2792
  markCount = active.length;
2793
2793
  }
2794
2794
  });
2795
- this.openWidget = openEnd > markCount;
2795
+ if (markCount > -1)
2796
+ this.openWidget = openEnd > markCount;
2796
2797
  if (!this.openWidget)
2797
2798
  b.addLineStartIfNotCovered(pendingLineAttrs);
2798
2799
  this.openMarks = openEnd;
package/dist/index.js CHANGED
@@ -2734,7 +2734,7 @@ class TileUpdate {
2734
2734
  }
2735
2735
  emit(from, to) {
2736
2736
  let pendingLineAttrs = null;
2737
- let b = this.builder, markCount = 0;
2737
+ let b = this.builder, markCount = -1;
2738
2738
  let openEnd = RangeSet.spans(this.decorations, from, to, {
2739
2739
  point: (from, to, deco, active, openStart, index) => {
2740
2740
  if (deco instanceof PointDecoration) {
@@ -2788,7 +2788,8 @@ class TileUpdate {
2788
2788
  markCount = active.length;
2789
2789
  }
2790
2790
  });
2791
- this.openWidget = openEnd > markCount;
2791
+ if (markCount > -1)
2792
+ this.openWidget = openEnd > markCount;
2792
2793
  if (!this.openWidget)
2793
2794
  b.addLineStartIfNotCovered(pendingLineAttrs);
2794
2795
  this.openMarks = openEnd;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemirror/view",
3
- "version": "6.43.5",
3
+ "version": "6.43.6",
4
4
  "description": "DOM view component for the CodeMirror code editor",
5
5
  "scripts": {
6
6
  "test": "cm-runtests",