diff --git a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts index bad8ffc25ad724deb71a1bcb62ffe2630974f008..1790a59241c982b3a4139cdfeacc4d4a32135485 100644 --- a/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts +++ b/src/vs/workbench/parts/preferences/browser/preferencesEditor.ts @@ -778,6 +778,9 @@ class SideBySidePreferencesWidget extends Widget { private lastFocusedEditor: BaseEditor; private splitview: SplitView; + private isVisible: boolean; + private group: IEditorGroup; + get minimumWidth(): number { return this.splitview.minimumSize; } get maximumWidth(): number { return this.splitview.maximumSize; } @@ -899,11 +902,14 @@ class SideBySidePreferencesWidget extends Widget { } public setEditorVisible(visible: boolean, group: IEditorGroup): void { + this.isVisible = visible; + this.group = group; + if (this.defaultPreferencesEditor) { - this.defaultPreferencesEditor.setVisible(visible, group); + this.defaultPreferencesEditor.setVisible(this.isVisible, this.group); } if (this.editablePreferencesEditor) { - this.editablePreferencesEditor.setVisible(visible, group); + this.editablePreferencesEditor.setVisible(this.isVisible, this.group); } } @@ -915,6 +921,7 @@ class SideBySidePreferencesWidget extends Widget { const editor = descriptor.instantiate(this.instantiationService); this.editablePreferencesEditor = editor; this.editablePreferencesEditor.create(this.editablePreferencesEditorContainer); + this.editablePreferencesEditor.setVisible(this.isVisible, this.group); (this.editablePreferencesEditor.getControl()).onDidFocusEditorWidget(() => this.lastFocusedEditor = this.editablePreferencesEditor); this.lastFocusedEditor = this.editablePreferencesEditor; this.layout();