mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 17:19:48 +01:00
fixes #99200
This commit is contained in:
@@ -154,6 +154,11 @@ export class BreakpointsView extends ViewPane {
|
||||
this.onBreakpointsChange();
|
||||
}
|
||||
}));
|
||||
|
||||
const containerModel = this.viewDescriptorService.getViewContainerModel(this.viewDescriptorService.getViewContainerByViewId(this.id)!)!;
|
||||
this._register(containerModel.onDidChangeAllViewDescriptors(() => {
|
||||
this.updateSize();
|
||||
}));
|
||||
}
|
||||
|
||||
public focus(): void {
|
||||
@@ -237,9 +242,11 @@ export class BreakpointsView extends ViewPane {
|
||||
}
|
||||
|
||||
private updateSize(): void {
|
||||
const containerModel = this.viewDescriptorService.getViewContainerModel(this.viewDescriptorService.getViewContainerByViewId(this.id)!)!;
|
||||
|
||||
// Adjust expanded body size
|
||||
this.minimumBodySize = this.orientation === Orientation.VERTICAL ? getExpandedBodySize(this.debugService.getModel(), MAX_VISIBLE_BREAKPOINTS) : 170;
|
||||
this.maximumBodySize = this.orientation === Orientation.VERTICAL ? getExpandedBodySize(this.debugService.getModel(), Number.POSITIVE_INFINITY) : Number.POSITIVE_INFINITY;
|
||||
this.maximumBodySize = this.orientation === Orientation.VERTICAL && containerModel.visibleViewDescriptors.length > 1 ? getExpandedBodySize(this.debugService.getModel(), Number.POSITIVE_INFINITY) : Number.POSITIVE_INFINITY;
|
||||
}
|
||||
|
||||
private onBreakpointsChange(): void {
|
||||
|
||||
@@ -303,6 +303,11 @@ export class OpenEditorsView extends ViewPane {
|
||||
this.listRefreshScheduler.schedule(0);
|
||||
}
|
||||
}));
|
||||
|
||||
const containerModel = this.viewDescriptorService.getViewContainerModel(this.viewDescriptorService.getViewContainerByViewId(this.id)!)!;
|
||||
this._register(containerModel.onDidChangeAllViewDescriptors(() => {
|
||||
this.updateSize();
|
||||
}));
|
||||
}
|
||||
|
||||
getActions(): IAction[] {
|
||||
@@ -446,6 +451,11 @@ export class OpenEditorsView extends ViewPane {
|
||||
}
|
||||
|
||||
private getMaxExpandedBodySize(): number {
|
||||
const containerModel = this.viewDescriptorService.getViewContainerModel(this.viewDescriptorService.getViewContainerByViewId(this.id)!)!;
|
||||
if (containerModel.visibleViewDescriptors.length <= 1) {
|
||||
return Number.POSITIVE_INFINITY;
|
||||
}
|
||||
|
||||
return this.elementCount * OpenEditorsDelegate.ITEM_HEIGHT;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user