MCPcopy Create free account
hub / github.com/ZenNotes/zennotes /

Class

packages/app-core/src/lib/cm-highlight.ts:211–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209
210const highlightPlugin = ViewPlugin.fromClass(
211 class {
212 decorations: DecorationSet
213 constructor(view: EditorView) {
214 this.decorations = buildDecorations(view)
215 }
216 update(update: ViewUpdate): void {
217 if (
218 update.docChanged ||
219 update.selectionSet ||
220 update.viewportChanged ||
221 update.focusChanged
222 ) {
223 this.decorations = buildDecorations(update.view)
224 }
225 }
226 },
227 {
228 decorations: (p) => p.decorations,
229 // Replacing decorations that hide ranges must be declared as atomic so the

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected