File tree Expand file tree Collapse file tree
src/vs/workbench/parts/debug/electron-browser Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments