diff --git a/src/gitBaseline.ts b/src/gitBaseline.ts index 3997b3b..560fcc5 100644 --- a/src/gitBaseline.ts +++ b/src/gitBaseline.ts @@ -119,7 +119,12 @@ export class GitBaselineAdapter implements vscode.Disposable { if (pending) clearTimeout(pending); pending = setTimeout(() => void repo.status().catch(() => {}), 150); }); - this.disposables.push({ dispose: () => watcher.close() }); + this.disposables.push({ + dispose: () => { + watcher.close(); + if (pending) clearTimeout(pending); + }, + }); } catch { // best-effort only — the passive repo.state.onDidChange listener still applies. }