Skip to content

Commit

Permalink
Aux window: Unable to switch to first editor group from new window (fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero authored Nov 20, 2023
1 parent dbc482a commit 356784e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/vs/workbench/browser/parts/editor/editorParts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*--------------------------------------------------------------------------------------------*/

import { localize } from 'vs/nls';
import { EditorGroupLayout, GroupDirection, GroupOrientation, GroupsArrangement, GroupsOrder, IAuxiliaryEditorPart, IEditorDropTargetDelegate, IEditorGroupsService, IEditorSideGroup, IFindGroupScope, IMergeGroupOptions } from 'vs/workbench/services/editor/common/editorGroupsService';
import { EditorGroupLayout, GroupDirection, GroupLocation, GroupOrientation, GroupsArrangement, GroupsOrder, IAuxiliaryEditorPart, IEditorDropTargetDelegate, IEditorGroupsService, IEditorSideGroup, IFindGroupScope, IMergeGroupOptions } from 'vs/workbench/services/editor/common/editorGroupsService';
import { Event, Emitter } from 'vs/base/common/event';
import { getActiveDocument } from 'vs/base/browser/dom';
import { Disposable, DisposableStore, IDisposable, toDisposable } from 'vs/base/common/lifecycle';
Expand Down Expand Up @@ -306,6 +306,12 @@ export class EditorParts extends Disposable implements IEditorGroupsService, IEd
}

findGroup(scope: IFindGroupScope, source?: IEditorGroupView | GroupIdentifier, wrap?: boolean): IEditorGroupView | undefined {
if (scope.location === GroupLocation.FIRST || scope.location === GroupLocation.LAST) {
// TODO implement support for all scopes with multiple editor parts
// https://github.com/microsoft/vscode/issues/198651
return scope.location === GroupLocation.FIRST ? this.groups[0] : this.groups[this.groups.length - 1];
}

if (source) {
return this.getPart(source).findGroup(scope, source, wrap);
}
Expand Down

0 comments on commit 356784e

Please sign in to comment.