diff --git a/src/lint.ts b/src/lint.ts index 0d1b9d6..0094fd7 100644 --- a/src/lint.ts +++ b/src/lint.ts @@ -99,7 +99,8 @@ class LintState { }).range(d.from) : Decoration.mark({ attributes: {class: "cm-lintRange cm-lintRange-" + d.severity + (d.markClass ? " " + d.markClass : "")}, - diagnostic: d + diagnostic: d, + inclusive: true }).range(d.from, d.to) }), true) return new LintState(ranges, panel, findDiagnostic(ranges)) @@ -178,7 +179,7 @@ export function diagnosticCount(state: EditorState) { return lint ? lint.diagnostics.size : 0 } -const activeMark = Decoration.mark({class: "cm-lintRange cm-lintRange-active"}) +const activeMark = Decoration.mark({class: "cm-lintRange cm-lintRange-active", inclusive: true}) function lintTooltip(view: EditorView, pos: number, side: -1 | 1) { let {diagnostics} = view.state.field(lintState)