From 057bb9336205dfed2ed64433e4d602a017a86d39 Mon Sep 17 00:00:00 2001 From: BenStullsBets Date: Thu, 2 Jul 2026 20:15:53 -0700 Subject: [PATCH] fix: clear reflog debounce timer on GitBaselineWatcher dispose (#71 item 6) Co-Authored-By: Claude Fable 5 --- src/gitBaseline.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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. }