未验证 提交 4c467c14 编写于 作者: J Jean Pierre 提交者: GitHub

Fixes editor has wrong height when toggling tabs with breadcrumbs visible (#97502)

* Fixes #97021

* Avoid calling relayout too often

* relayout on options change
Co-authored-by: NBenjamin Pasero <benjpas@microsoft.com>
上级 895cf0f3
......@@ -611,11 +611,11 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
// Title control Switch between showing tabs <=> not showing tabs
if (event.oldPartOptions.showTabs !== event.newPartOptions.showTabs) {
// Recreate and layout control
// Recreate title control
this.createTitleAreaControl();
if (this.dimension) {
this.layoutTitleAreaControl(this.dimension.width);
}
// Re-layout
this.relayout();
// Ensure to show active editor if any
if (this._group.activeEditor) {
......
......@@ -232,7 +232,7 @@ export class NoTabsTitleControl extends TitleControl {
private redraw(): void {
const editor = withNullAsUndefined(this.group.activeEditor);
const isEditorPinned = this.group.activeEditor ? this.group.isPinned(this.group.activeEditor) : false;
const isEditorPinned = editor ? this.group.isPinned(editor) : false;
const isGroupActive = this.accessor.activeGroup === this.group;
this.activeLabel = { editor, pinned: isEditorPinned };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册