mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 19:18:59 +01:00
Clean up some usages of IDisposable[]
Part of #74250 - Extend `Disposable` in classes where it makes sense - Use `DisposableStore` for lists of disposables - Make `combinedDisposable` take arguments instead of an array (so that you can't pass in an array and then modify the array after the fact)
This commit is contained in:
@@ -176,11 +176,11 @@ class MainThreadDocumentAndEditorStateComputer {
|
||||
}
|
||||
|
||||
private _onDidAddEditor(e: ICodeEditor): void {
|
||||
this._toDisposeOnEditorRemove.set(e.getId(), combinedDisposable([
|
||||
this._toDisposeOnEditorRemove.set(e.getId(), combinedDisposable(
|
||||
e.onDidChangeModel(() => this._updateState()),
|
||||
e.onDidFocusEditorText(() => this._updateState()),
|
||||
e.onDidFocusEditorWidget(() => this._updateState(e))
|
||||
]));
|
||||
));
|
||||
this._updateState();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user