提交 1fb26f9b 编写于 作者: S SteVen Batten

make editor area return more intuitive

上级 be7d9cce
......@@ -110,6 +110,9 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor
private _onDidPreferredSizeChange: Emitter<void> = this._register(new Emitter<void>());
get onDidPreferredSizeChange(): Event<void> { return this._onDidPreferredSizeChange.event; }
private _onDidActivateGroup: Emitter<IEditorGroupView> = this._register(new Emitter<IEditorGroupView>());
get onDidActivateGroup(): Event<IEditorGroupView> { return this._onDidActivateGroup.event; }
//#endregion
private dimension: Dimension;
......@@ -319,6 +322,7 @@ export class EditorPart extends Part implements EditorGroupsServiceImpl, IEditor
const groupView = this.assertGroupView(group);
this.doSetGroupActive(groupView);
this._onDidActivateGroup.fire(groupView);
return groupView;
}
......
......@@ -502,6 +502,9 @@ export class Workbench extends Disposable implements IPartService {
// Listen to visible editor changes
this._register(this.editorService.onDidVisibleEditorsChange(() => this.onDidVisibleEditorsChange()));
// Listen to editor group activations when editor is hidden
this._register(this.editorPart.onDidActivateGroup(() => { if (this.editorHidden) { this.setEditorHidden(false); } }));
// Listen to editor closing (if we run with --wait)
const filesToWait = this.workbenchParams.configuration.filesToWait;
if (filesToWait) {
......@@ -1272,6 +1275,8 @@ export class Workbench extends Disposable implements IPartService {
return !this.statusBarHidden;
case Parts.ACTIVITYBAR_PART:
return !this.activityBarHidden;
case Parts.EDITOR_PART:
return this.workbenchGrid instanceof Grid ? !this.editorHidden : true;
}
return true; // any other part cannot be hidden
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册