@codemirror/view 6.36.7 → 6.36.8

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,11 @@
1
+ ## 6.36.8 (2025-05-12)
2
+
3
+ ### Bug fixes
4
+
5
+ Make `logException` log errors to the console when `onerror` returns a falsy value.
6
+
7
+ Fix an issue in `MatchDecorator` causing `updateDeco` to sometimes not do the right thing for deletions.
8
+
1
9
  ## 6.36.7 (2025-05-02)
2
10
 
3
11
  ### Bug fixes
package/dist/index.cjs CHANGED
@@ -2422,8 +2422,7 @@ function logException(state, exception, context) {
2422
2422
  let handler = state.facet(exceptionSink);
2423
2423
  if (handler.length)
2424
2424
  handler[0](exception);
2425
- else if (window.onerror)
2426
- window.onerror(String(exception), context, undefined, undefined, exception);
2425
+ else if (window.onerror && window.onerror(String(exception), context, undefined, undefined, exception)) ;
2427
2426
  else if (context)
2428
2427
  console.error(context + ":", exception);
2429
2428
  else
@@ -9341,7 +9340,7 @@ class MatchDecorator {
9341
9340
  updateRange(view, deco, updateFrom, updateTo) {
9342
9341
  for (let r of view.visibleRanges) {
9343
9342
  let from = Math.max(r.from, updateFrom), to = Math.min(r.to, updateTo);
9344
- if (to > from) {
9343
+ if (to >= from) {
9345
9344
  let fromLine = view.state.doc.lineAt(from), toLine = fromLine.to < to ? view.state.doc.lineAt(to) : fromLine;
9346
9345
  let start = Math.max(r.from, fromLine.from), end = Math.min(r.to, toLine.to);
9347
9346
  if (this.boundary) {
@@ -11164,8 +11163,7 @@ function highlightWhitespace() {
11164
11163
  }
11165
11164
  const trailingHighlighter = matcher(new MatchDecorator({
11166
11165
  regexp: /\s+$/g,
11167
- decoration: Decoration.mark({ class: "cm-trailingSpace" }),
11168
- boundary: /\S/,
11166
+ decoration: Decoration.mark({ class: "cm-trailingSpace" })
11169
11167
  }));
11170
11168
  /**
11171
11169
  Returns an extension that adds a `cm-trailingSpace` class to all
package/dist/index.js CHANGED
@@ -2418,8 +2418,7 @@ function logException(state, exception, context) {
2418
2418
  let handler = state.facet(exceptionSink);
2419
2419
  if (handler.length)
2420
2420
  handler[0](exception);
2421
- else if (window.onerror)
2422
- window.onerror(String(exception), context, undefined, undefined, exception);
2421
+ else if (window.onerror && window.onerror(String(exception), context, undefined, undefined, exception)) ;
2423
2422
  else if (context)
2424
2423
  console.error(context + ":", exception);
2425
2424
  else
@@ -9336,7 +9335,7 @@ class MatchDecorator {
9336
9335
  updateRange(view, deco, updateFrom, updateTo) {
9337
9336
  for (let r of view.visibleRanges) {
9338
9337
  let from = Math.max(r.from, updateFrom), to = Math.min(r.to, updateTo);
9339
- if (to > from) {
9338
+ if (to >= from) {
9340
9339
  let fromLine = view.state.doc.lineAt(from), toLine = fromLine.to < to ? view.state.doc.lineAt(to) : fromLine;
9341
9340
  let start = Math.max(r.from, fromLine.from), end = Math.min(r.to, toLine.to);
9342
9341
  if (this.boundary) {
@@ -11159,8 +11158,7 @@ function highlightWhitespace() {
11159
11158
  }
11160
11159
  const trailingHighlighter = /*@__PURE__*/matcher(/*@__PURE__*/new MatchDecorator({
11161
11160
  regexp: /\s+$/g,
11162
- decoration: /*@__PURE__*/Decoration.mark({ class: "cm-trailingSpace" }),
11163
- boundary: /\S/,
11161
+ decoration: /*@__PURE__*/Decoration.mark({ class: "cm-trailingSpace" })
11164
11162
  }));
11165
11163
  /**
11166
11164
  Returns an extension that adds a `cm-trailingSpace` class to all
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemirror/view",
3
- "version": "6.36.7",
3
+ "version": "6.36.8",
4
4
  "description": "DOM view component for the CodeMirror code editor",
5
5
  "scripts": {
6
6
  "test": "cm-runtests",
package/tdrawlog.txt DELETED
@@ -1,96 +0,0 @@
1
- 372 --- Process Attached
2
- 372 --- lmap success
3
- 372 --- Init TAConfig
4
- 372 --- Install Limit Crack
5
- 372 --- IncreaseAISearchMapEntriesLimit
6
- 372 --- WriteNewLimit
7
- 372 --- IncreaseCompositeBuf
8
- 372 --- IncreaseSfxLimit
9
- 372 --- FullScreenMinimap init
10
- 372 --- DirectDrawCreate
11
- 372 --- IDDraw Created
12
- 372 --- returning from DirectDrawCreate
13
- 372 --- SetCooperativeLevel
14
- 372 --- SetCooperativeLevel, GUI theadid = 372
15
- 372 --- SetDisplayMode
16
- 372 --- CreateSurface
17
- 372 --- New Dialog
18
- 372 --- New AlliesWhiteboard
19
- 372 --- New CIncome
20
- 372 --- New CTAHook
21
- 372 --- New CWarp
22
- 372 --- New CMapRect
23
- 372 --- New CChangeQueue
24
- 372 --- New CMinimapHandler
25
- 372 --- IDDrawSurface Created
26
- 372 --- GetAttachedSurface
27
- 372 --- CreateClipper
28
- 372 --- SetClipper
29
- 372 --- CreatePalette
30
- 372 --- SetPalette
31
- 372 --- New ExternQuickKey
32
- 372 --- Blt
33
- 404 --- MegamapTAStuff
34
- 404 --- UnitsMap Surface Init
35
- 372 --- IsLost
36
- 372 --- [DDrawSurface::Release] ...
37
- 372 --- DDRAW::Release
38
- 372 --- DirectDrawCreate
39
- 372 --- IDDraw Created
40
- 372 --- returning from DirectDrawCreate
41
- 372 --- SetCooperativeLevel
42
- 372 --- SetCooperativeLevel, GUI theadid = 372
43
- 372 --- SetDisplayMode
44
- 372 --- CreateSurface
45
- 372 --- New Dialog
46
- 372 --- New AlliesWhiteboard
47
- 372 --- New CIncome
48
- 372 --- New CTAHook
49
- 372 --- New CWarp
50
- 372 --- New CMapRect
51
- 372 --- New CChangeQueue
52
- 372 --- New CMinimapHandler
53
- 372 --- UnitsMap Surface Init
54
- 372 --- IDDrawSurface Created
55
- 372 --- GetAttachedSurface
56
- 372 --- CreateClipper
57
- 372 --- SetClipper
58
- 372 --- CreatePalette
59
- 372 --- SetPalette
60
- 372 --- [WindSpeedSyncProc] initialsing RNG using current time. t=809896644
61
- 372 --- InitPictureColors
62
- 372 --- InitUnSelectedPictureColors
63
- 372 --- InitUnSelectedPictureColors
64
- 372 --- IsLost
65
- 372 --- [DDrawSurface::Release] ...
66
- 372 --- DDRAW::Release
67
- 372 --- DirectDrawCreate
68
- 372 --- IDDraw Created
69
- 372 --- returning from DirectDrawCreate
70
- 372 --- SetCooperativeLevel
71
- 372 --- SetCooperativeLevel, GUI theadid = 372
72
- 372 --- SetDisplayMode
73
- 372 --- CreateSurface
74
- 372 --- New Dialog
75
- 372 --- New AlliesWhiteboard
76
- 372 --- New CIncome
77
- 372 --- New CTAHook
78
- 372 --- New CWarp
79
- 372 --- New CMapRect
80
- 372 --- New CChangeQueue
81
- 372 --- New CMinimapHandler
82
- 372 --- UnitsMap Surface Init
83
- 372 --- IDDrawSurface Created
84
- 372 --- GetAttachedSurface
85
- 372 --- CreateClipper
86
- 372 --- SetClipper
87
- 372 --- CreatePalette
88
- 372 --- SetPalette
89
- 372 --- [DDrawSurface::Release] ...
90
- 372 --- DDRAW::Release
91
- 372 --- Release AddtionRoutine_CircleSelect
92
- 372 --- Uninstall Limit Crack
93
- 372 --- Release IncreaseUnitTypeLimit
94
- 372 --- Release IncreaseCompositeBuf
95
- 372 --- Release IncreaseSfxLimit
96
- 372 --- Release AddtionRoutine_CircleSelect