diff --git a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts index 571bbcea85ae31c5d8b7e6b7c22304d393dd2511..0f92832f2060723ae71d3289ff439443a7f60bf7 100644 --- a/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts +++ b/src/vs/workbench/parts/scm/electron-browser/scmViewlet.ts @@ -249,12 +249,13 @@ class MainPanel extends ViewletPanel { identityProvider: repository => repository.provider.id }) as WorkbenchList; - this.disposables.push(this.list); this.list.onSelectionChange(this.onListSelectionChange, this, this.disposables); this.list.onContextMenu(this.onListContextMenu, this, this.disposables); this.viewModel.onDidChangeVisibility(this.onDidChangeVisibility, this, this.disposables); this.onDidChangeVisibility(this.viewModel.isVisible()); + + this.disposables.push(this.list); } private onDidChangeVisibility(visible: boolean): void {