@codemirror/search
Advanced tools
Comparing version 6.5.1 to 6.5.2
@@ -0,1 +1,7 @@ | ||
## 6.5.2 (2023-08-26) | ||
### Bug fixes | ||
Don't use the very lowest precedence for match highlighting decorations. | ||
## 6.5.1 (2023-08-04) | ||
@@ -2,0 +8,0 @@ |
@@ -136,3 +136,3 @@ import * as _codemirror_state from '@codemirror/state'; | ||
declare type HighlightOptions = { | ||
type HighlightOptions = { | ||
/** | ||
@@ -139,0 +139,0 @@ Determines whether, when nothing is selected, the word around |
@@ -252,3 +252,3 @@ import { showPanel, EditorView, getPanel, Decoration, ViewPlugin, runScopeHandlers } from '@codemirror/view'; | ||
this.test = options === null || options === void 0 ? void 0 : options.test; | ||
this.flat = FlattenedDoc.get(text, from, this.chunkEnd(from + 5000 /* Base */)); | ||
this.flat = FlattenedDoc.get(text, from, this.chunkEnd(from + 5000 /* Chunk.Base */)); | ||
} | ||
@@ -659,3 +659,3 @@ chunkEnd(pos) { | ||
for (let pos = to;;) { | ||
let start = Math.max(from, pos - 10000 /* ChunkSize */ - this.spec.unquoted.length); | ||
let start = Math.max(from, pos - 10000 /* FindPrev.ChunkSize */ - this.spec.unquoted.length); | ||
let cursor = stringCursor(this.spec, state, start, pos), range = null; | ||
@@ -668,3 +668,3 @@ while (!cursor.nextOverlapping().done) | ||
return null; | ||
pos -= 10000 /* ChunkSize */; | ||
pos -= 10000 /* FindPrev.ChunkSize */; | ||
} | ||
@@ -720,3 +720,3 @@ } | ||
for (let size = 1;; size++) { | ||
let start = Math.max(from, to - size * 10000 /* ChunkSize */); | ||
let start = Math.max(from, to - size * 10000 /* FindPrev.ChunkSize */); | ||
let cursor = regexpCursor(this.spec, state, start, to), range = null; | ||
@@ -751,3 +751,3 @@ while (!cursor.next().done) | ||
highlight(state, from, to, add) { | ||
let cursor = regexpCursor(this.spec, state, Math.max(0, from - 250 /* HighlightMargin */), Math.min(to + 250 /* HighlightMargin */, state.doc.length)); | ||
let cursor = regexpCursor(this.spec, state, Math.max(0, from - 250 /* RegExp.HighlightMargin */), Math.min(to + 250 /* RegExp.HighlightMargin */, state.doc.length)); | ||
while (!cursor.next().done) | ||
@@ -819,3 +819,3 @@ add(cursor.value.from, cursor.value.to); | ||
let { from, to } = ranges[i]; | ||
while (i < l - 1 && to > ranges[i + 1].from - 2 * 250 /* HighlightMargin */) | ||
while (i < l - 1 && to > ranges[i + 1].from - 2 * 250 /* RegExp.HighlightMargin */) | ||
to = ranges[++i].to; | ||
@@ -1220,3 +1220,3 @@ query.highlight(view.state, from, to, (from, to) => { | ||
searchState, | ||
/*@__PURE__*/Prec.lowest(searchHighlighter), | ||
/*@__PURE__*/Prec.low(searchHighlighter), | ||
baseTheme | ||
@@ -1223,0 +1223,0 @@ ]; |
{ | ||
"name": "@codemirror/search", | ||
"version": "6.5.1", | ||
"version": "6.5.2", | ||
"description": "Search functionality for the CodeMirror code editor", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
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
131281
2800