Skip to content

Commit 88a2fba

Browse files
committed
debug: breakpoints view initial size
fixes microsoft#35179
1 parent 45db6b7 commit 88a2fba

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

src/vs/workbench/parts/debug/electron-browser/debugViews.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ export class BreakpointsView extends ViewsViewletPanel {
397397
ariaHeaderLabel: nls.localize('breakpointsSection', "Breakpoints Section")
398398
}, keybindingService, contextMenuService);
399399

400-
this.minimumBodySize = this.maximumBodySize = 0;
400+
this.minimumBodySize = this.maximumBodySize = this.getExpandedBodySize();
401401
this.settings = options.viewletSettings;
402402
this.breakpointsFocusedContext = CONTEXT_BREAKPOINTS_FOCUSED.bindTo(contextKeyService);
403403
this.disposables.push(this.debugService.getModel().onDidChangeBreakpoints(() => this.onBreakpointsChange()));
@@ -488,17 +488,15 @@ export class BreakpointsView extends ViewsViewletPanel {
488488
}
489489

490490
private onBreakpointsChange(): void {
491-
const model = this.debugService.getModel();
492-
493-
const bodySize = BreakpointsView.getExpandedBodySize(model.getBreakpoints().length + model.getExceptionBreakpoints().length + model.getFunctionBreakpoints().length);
494-
this.minimumBodySize = this.maximumBodySize = bodySize;
495-
491+
this.minimumBodySize = this.maximumBodySize = this.getExpandedBodySize();
496492
if (this.tree) {
497493
this.tree.refresh();
498494
}
499495
}
500496

501-
private static getExpandedBodySize(length: number): number {
497+
private getExpandedBodySize(): number {
498+
const model = this.debugService.getModel();
499+
const length = model.getBreakpoints().length + model.getExceptionBreakpoints().length + model.getFunctionBreakpoints().length;
502500
return Math.min(BreakpointsView.MAX_VISIBLE_FILES, length) * 22;
503501
}
504502

0 commit comments

Comments
 (0)