@codemirror/lint 6.9.3 → 6.9.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 +10 -4
- package/dist/index.js +10 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 6.9.5 (2026-03-02)
|
|
2
|
+
|
|
3
|
+
### Bug fixes
|
|
4
|
+
|
|
5
|
+
Use more appropriate background colors for the selected diagnostic in dark mode.
|
|
6
|
+
|
|
7
|
+
## 6.9.4 (2026-02-11)
|
|
8
|
+
|
|
9
|
+
### Bug fixes
|
|
10
|
+
|
|
11
|
+
Make sure `nextDiagnostic` selects entire diagnostics, even when they overlap with other diagnostics.
|
|
12
|
+
|
|
1
13
|
## 6.9.3 (2026-01-27)
|
|
2
14
|
|
|
3
15
|
### Bug fixes
|
package/dist/index.cjs
CHANGED
|
@@ -243,10 +243,10 @@ const nextDiagnostic = (view) => {
|
|
|
243
243
|
let field = view.state.field(lintState, false);
|
|
244
244
|
if (!field)
|
|
245
245
|
return false;
|
|
246
|
-
let sel = view.state.selection.main, next = field.diagnostics
|
|
247
|
-
if (!next
|
|
248
|
-
next = field.diagnostics
|
|
249
|
-
if (!next
|
|
246
|
+
let sel = view.state.selection.main, next = findDiagnostic(field.diagnostics, null, sel.to + 1);
|
|
247
|
+
if (!next) {
|
|
248
|
+
next = findDiagnostic(field.diagnostics, null, 0);
|
|
249
|
+
if (!next || next.from == sel.from && next.to == sel.to)
|
|
250
250
|
return false;
|
|
251
251
|
}
|
|
252
252
|
view.dispatch({ selection: { anchor: next.from, head: next.to }, scrollIntoView: true });
|
|
@@ -726,6 +726,12 @@ const baseTheme = view.EditorView.baseTheme({
|
|
|
726
726
|
padding: 0,
|
|
727
727
|
margin: 0
|
|
728
728
|
}
|
|
729
|
+
},
|
|
730
|
+
"&dark .cm-lintRange-active": { backgroundColor: "#86714a80" },
|
|
731
|
+
"&dark .cm-panel.cm-panel-lint ul": {
|
|
732
|
+
"& [aria-selected]": {
|
|
733
|
+
backgroundColor: "#2e343e",
|
|
734
|
+
},
|
|
729
735
|
}
|
|
730
736
|
});
|
|
731
737
|
function severityWeight(sev) {
|
package/dist/index.js
CHANGED
|
@@ -241,10 +241,10 @@ const nextDiagnostic = (view) => {
|
|
|
241
241
|
let field = view.state.field(lintState, false);
|
|
242
242
|
if (!field)
|
|
243
243
|
return false;
|
|
244
|
-
let sel = view.state.selection.main, next = field.diagnostics
|
|
245
|
-
if (!next
|
|
246
|
-
next = field.diagnostics
|
|
247
|
-
if (!next
|
|
244
|
+
let sel = view.state.selection.main, next = findDiagnostic(field.diagnostics, null, sel.to + 1);
|
|
245
|
+
if (!next) {
|
|
246
|
+
next = findDiagnostic(field.diagnostics, null, 0);
|
|
247
|
+
if (!next || next.from == sel.from && next.to == sel.to)
|
|
248
248
|
return false;
|
|
249
249
|
}
|
|
250
250
|
view.dispatch({ selection: { anchor: next.from, head: next.to }, scrollIntoView: true });
|
|
@@ -724,6 +724,12 @@ const baseTheme = /*@__PURE__*/EditorView.baseTheme({
|
|
|
724
724
|
padding: 0,
|
|
725
725
|
margin: 0
|
|
726
726
|
}
|
|
727
|
+
},
|
|
728
|
+
"&dark .cm-lintRange-active": { backgroundColor: "#86714a80" },
|
|
729
|
+
"&dark .cm-panel.cm-panel-lint ul": {
|
|
730
|
+
"& [aria-selected]": {
|
|
731
|
+
backgroundColor: "#2e343e",
|
|
732
|
+
},
|
|
727
733
|
}
|
|
728
734
|
});
|
|
729
735
|
function severityWeight(sev) {
|