(highlights, tr)
| 38 | return Decoration.none; |
| 39 | }, |
| 40 | update(highlights, tr) { |
| 41 | highlights = RangeSet.empty; |
| 42 | for (let e of tr.effects) { |
| 43 | if (e.is(addHighlight)) { |
| 44 | highlights = highlights.update({ |
| 45 | add: [highlighter.range(e.value.from, e.value.to)], |
| 46 | }); |
| 47 | } |
| 48 | } |
| 49 | return highlights; |
| 50 | }, |
| 51 | provide: (f) => EditorView.decorations.from(f), |
| 52 | }); |
| 53 | const effects = [addHighlight.of(range)]; |