@codemirror/lint 6.9.2 → 6.9.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 CHANGED
@@ -1,3 +1,15 @@
1
+ ## 6.9.4 (2026-02-11)
2
+
3
+ ### Bug fixes
4
+
5
+ Make sure `nextDiagnostic` selects entire diagnostics, even when they overlap with other diagnostics.
6
+
7
+ ## 6.9.3 (2026-01-27)
8
+
9
+ ### Bug fixes
10
+
11
+ Fix an issue where the lint panel inappropriately blocks the default behavior of key combinations with Ctrl, Alt, or Cmd held.
12
+
1
13
  ## 6.9.2 (2025-11-03)
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.iter(sel.to + 1);
247
- if (!next.value) {
248
- next = field.diagnostics.iter(0);
249
- if (!next.value || next.from == sel.from && next.to == sel.to)
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 });
@@ -460,6 +460,8 @@ class LintPanel {
460
460
  this.view = view;
461
461
  this.items = [];
462
462
  let onkeydown = (event) => {
463
+ if (event.ctrlKey || event.altKey || event.metaKey)
464
+ return;
463
465
  if (event.keyCode == 27) { // Escape
464
466
  closeLintPanel(this.view);
465
467
  this.view.focus();
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.iter(sel.to + 1);
245
- if (!next.value) {
246
- next = field.diagnostics.iter(0);
247
- if (!next.value || next.from == sel.from && next.to == sel.to)
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 });
@@ -458,6 +458,8 @@ class LintPanel {
458
458
  this.view = view;
459
459
  this.items = [];
460
460
  let onkeydown = (event) => {
461
+ if (event.ctrlKey || event.altKey || event.metaKey)
462
+ return;
461
463
  if (event.keyCode == 27) { // Escape
462
464
  closeLintPanel(this.view);
463
465
  this.view.focus();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemirror/lint",
3
- "version": "6.9.2",
3
+ "version": "6.9.4",
4
4
  "description": "Linting support for the CodeMirror code editor",
5
5
  "scripts": {
6
6
  "test": "cm-runtests",
@@ -35,6 +35,6 @@
35
35
  },
36
36
  "repository": {
37
37
  "type": "git",
38
- "url": "https://github.com/codemirror/lint.git"
38
+ "url": "git+https://github.com/codemirror/lint.git"
39
39
  }
40
40
  }