fix: clear reflog debounce timer on GitBaselineWatcher dispose (#71 item 6)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+6
-1
@@ -119,7 +119,12 @@ export class GitBaselineAdapter implements vscode.Disposable {
|
|||||||
if (pending) clearTimeout(pending);
|
if (pending) clearTimeout(pending);
|
||||||
pending = setTimeout(() => void repo.status().catch(() => {}), 150);
|
pending = setTimeout(() => void repo.status().catch(() => {}), 150);
|
||||||
});
|
});
|
||||||
this.disposables.push({ dispose: () => watcher.close() });
|
this.disposables.push({
|
||||||
|
dispose: () => {
|
||||||
|
watcher.close();
|
||||||
|
if (pending) clearTimeout(pending);
|
||||||
|
},
|
||||||
|
});
|
||||||
} catch {
|
} catch {
|
||||||
// best-effort only — the passive repo.state.onDidChange listener still applies.
|
// best-effort only — the passive repo.state.onDidChange listener still applies.
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user