Skip to content

Commit ee183be

Browse files
committed
fix double terminal
1 parent 3e2df0a commit ee183be

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/vs/workbench/services/views/browser/viewDescriptorService.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,11 @@ export class ViewDescriptorService extends Disposable implements IViewDescriptor
156156
continue;
157157
}
158158

159-
this.addViews(viewContainer, containerData.views);
159+
// Filter out views that have already been added to the view container model
160+
// This is needed when statically-registered views are moved to
161+
// other statically registered containers as they will both try to add on startup
162+
const viewsToAdd = containerData.views.filter(view => this.getViewContainerModel(viewContainer).allViewDescriptors.filter(vd => vd.id === view.id).length === 0);
163+
this.addViews(viewContainer, viewsToAdd);
160164
}
161165
}
162166

0 commit comments

Comments
 (0)