private ensureWatcher()

in src/test-explorer/decorator.ts [100:113]


  private ensureWatcher(uri: vscode.Uri, repoRoot: string) {
    const existing = this.activeFiles.get(uri.fsPath)
    if (existing) {
      existing.dispose()
    }

    const watcher = vscode.window.onDidChangeActiveTextEditor(async editor => {
      if (editor?.document.uri === uri) {
        await this.refreshDecoratorPositions(editor, repoRoot)
      }
    })

    this.activeFiles.set(uri.fsPath, watcher)
  }