(document: vs.TextDocument, positions: vs.Position[])
| 38 | } |
| 39 | |
| 40 | public trackDoc(document: vs.TextDocument, positions: vs.Position[]) { |
| 41 | // Stash all positions as offsets. |
| 42 | this.positionMap.clear(); |
| 43 | for (const position of positions) |
| 44 | this.positionMap.set(position, document.offsetAt(position)); |
| 45 | |
| 46 | // Track via the offset tracker. |
| 47 | this.tracker.trackDoc(document, [...this.positionMap.values()]); |
| 48 | } |
| 49 | |
| 50 | public dispose() { |
| 51 | disposeAll(this.disposables); |