| 209 | |
| 210 | const 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 |
nothing calls this directly
no outgoing calls
no test coverage detected