Skip to content

Commit 65c06f6

Browse files
committed
breadcrumbs - fix picker tree height
1 parent b7a273b commit 65c06f6

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

src/vs/platform/list/browser/listService.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { DefaultController, IControllerOptions, OpenMode, ClickBehavior, Default
2323
import { isUndefinedOrNull } from 'vs/base/common/types';
2424
import { IEditorOptions } from 'vs/platform/editor/common/editor';
2525
import { Event, Emitter } from 'vs/base/common/event';
26-
import { createStyleSheet, addStandardDisposableListener } from 'vs/base/browser/dom';
26+
import { createStyleSheet, addStandardDisposableListener, getTotalHeight } from 'vs/base/browser/dom';
2727
import { ScrollbarVisibility } from 'vs/base/common/scrollable';
2828
import { InputBox, IInputOptions } from 'vs/base/browser/ui/inputbox/inputBox';
2929
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
@@ -605,7 +605,8 @@ export class HighlightingTreeController extends WorkbenchTreeController {
605605

606606
export class HighlightingWorkbenchTree extends WorkbenchTree {
607607

608-
readonly input: InputBox;
608+
protected readonly inputContainer: HTMLElement;
609+
protected readonly input: InputBox;
609610

610611
protected readonly renderer: IHighlightingRenderer;
611612

@@ -638,6 +639,7 @@ export class HighlightingWorkbenchTree extends WorkbenchTree {
638639
this.renderer = treeConfiguration.renderer;
639640

640641
// create input
642+
this.inputContainer = inputContainer;
641643
this.input = new InputBox(inputContainer, contextViewService, listOptions);
642644
this.input.setEnabled(false);
643645
this.input.onDidChange(this.updateHighlights, this, this.disposables);
@@ -670,7 +672,7 @@ export class HighlightingWorkbenchTree extends WorkbenchTree {
670672

671673
layout(height?: number, width?: number): void {
672674
this.input.layout();
673-
super.layout(isNaN(height) ? height : height - this.input.height, width);
675+
super.layout(isNaN(height) ? height : height - getTotalHeight(this.inputContainer), width);
674676
}
675677

676678
private lastSelection: any[];

0 commit comments

Comments
 (0)