File tree Expand file tree Collapse file tree
src/vs/workbench/browser/parts/editor Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,12 +81,15 @@ export interface IEditorOpeningEvent extends IEditorIdentifier {
8181}
8282
8383export interface IEditorGroupsAccessor {
84+
8485 readonly groups : IEditorGroupView [ ] ;
8586 readonly activeGroup : IEditorGroupView ;
8687
8788 readonly partOptions : IEditorPartOptions ;
8889 readonly onDidEditorPartOptionsChange : Event < IEditorPartOptionsChangeEvent > ;
8990
91+ readonly onDidVisibilityChange : Event < boolean > ;
92+
9093 getGroup ( identifier : GroupIdentifier ) : IEditorGroupView | undefined ;
9194 getGroups ( order : GroupsOrder ) : IEditorGroupView [ ] ;
9295
Original file line number Diff line number Diff line change @@ -221,6 +221,12 @@ export class EditorControl extends Disposable {
221221 }
222222 }
223223
224+ setVisible ( visible : boolean ) : void {
225+ if ( this . _activeControl ) {
226+ this . _activeControl . setVisible ( visible , this . groupView ) ;
227+ }
228+ }
229+
224230 layout ( dimension : Dimension ) : void {
225231 this . dimension = dimension ;
226232
Original file line number Diff line number Diff line change @@ -468,6 +468,9 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
468468
469469 // Option Changes
470470 this . _register ( this . accessor . onDidEditorPartOptionsChange ( e => this . onDidEditorPartOptionsChange ( e ) ) ) ;
471+
472+ // Visibility
473+ this . _register ( this . accessor . onDidVisibilityChange ( e => this . onDidVisibilityChange ( e ) ) ) ;
471474 }
472475
473476 private onDidEditorPin ( editor : EditorInput ) : void {
@@ -635,6 +638,12 @@ export class EditorGroupView extends Themable implements IEditorGroupView {
635638 this . _onDidGroupChange . fire ( { kind : GroupChangeKind . EDITOR_LABEL , editor } ) ;
636639 }
637640
641+ private onDidVisibilityChange ( visible : boolean ) : void {
642+
643+ // Forward to editor control
644+ this . editorControl . setVisible ( visible ) ;
645+ }
646+
638647 //#endregion
639648
640649 //region IEditorGroupView
You can’t perform that action at this time.
0 commit comments