@codemirror/lint
Advanced tools
Comparing version 6.2.1 to 6.2.2
@@ -0,1 +1,7 @@ | ||
## 6.2.2 (2023-06-05) | ||
### Bug fixes | ||
Make sure lint gutter tooltips are properly closed when the content of their line changes. | ||
## 6.2.1 (2023-04-13) | ||
@@ -2,0 +8,0 @@ |
@@ -50,3 +50,4 @@ import { Decoration, showPanel, EditorView, ViewPlugin, logException, gutter, showTooltip, hoverTooltip, getPanel, WidgetType, GutterMarker } from '@codemirror/view'; | ||
function hideTooltip(tr, tooltip) { | ||
return !!(tr.effects.some(e => e.is(setDiagnosticsEffect)) || tr.changes.touchesRange(tooltip.pos)); | ||
let line = tr.startState.doc.lineAt(tooltip.pos); | ||
return !!(tr.effects.some(e => e.is(setDiagnosticsEffect)) || tr.changes.touchesRange(line.from, line.to)); | ||
} | ||
@@ -608,4 +609,4 @@ function maybeEnableLint(state, effects) { | ||
let rect = marker.getBoundingClientRect(); | ||
if (event.clientX > rect.left - 10 /* Hover.Margin */ && event.clientX < rect.right + 10 /* Hover.Margin */ && | ||
event.clientY > rect.top - 10 /* Hover.Margin */ && event.clientY < rect.bottom + 10 /* Hover.Margin */) | ||
if (event.clientX > rect.left - 10 /* Margin */ && event.clientX < rect.right + 10 /* Margin */ && | ||
event.clientY > rect.top - 10 /* Margin */ && event.clientY < rect.bottom + 10 /* Margin */) | ||
return; | ||
@@ -731,3 +732,3 @@ for (let target = event.target; target; target = target.parentNode) { | ||
return combineConfig(configs, { | ||
hoverTime: 300 /* Hover.Time */, | ||
hoverTime: 300 /* Time */, | ||
markerFilter: null, | ||
@@ -734,0 +735,0 @@ tooltipFilter: null |
{ | ||
"name": "@codemirror/lint", | ||
"version": "6.2.1", | ||
"version": "6.2.2", | ||
"description": "Linting support for the CodeMirror code editor", | ||
@@ -34,3 +34,3 @@ "scripts": { | ||
"devDependencies": { | ||
"@codemirror/buildhelper": "^0.1.0" | ||
"@codemirror/buildhelper": "^1.0.0" | ||
}, | ||
@@ -37,0 +37,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76831
9
1685