diff --git a/src/vs/workbench/browser/parts/editor/editorCommands.ts b/src/vs/workbench/browser/parts/editor/editorCommands.ts index 9a22dbc334b621462ecab318da95c8c96a0dc471..462b964ee5c2bb2a9b050efc5deadc1eef6f635a 100644 --- a/src/vs/workbench/browser/parts/editor/editorCommands.ts +++ b/src/vs/workbench/browser/parts/editor/editorCommands.ts @@ -8,7 +8,7 @@ import * as types from 'vs/base/common/types'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { TextCompareEditorVisibleContext, EditorInput, IEditorIdentifier, IEditorCommandsContext, ActiveEditorGroupEmptyContext, MultipleEditorGroupsContext, CloseDirection, IEditor, IEditorInput } from 'vs/workbench/common/editor'; -import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; +import { IEditorService, IActiveEditor } from 'vs/workbench/services/editor/common/editorService'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { TextDiffEditor } from 'vs/workbench/browser/parts/editor/textDiffEditor'; import { KeyMod, KeyCode, KeyChord } from 'vs/base/common/keyCodes'; @@ -113,7 +113,7 @@ function moveActiveEditor(args: ActiveEditorMoveArguments = Object.create(null), } } -function moveActiveTab(args: ActiveEditorMoveArguments, control: IEditor, accessor: ServicesAccessor): void { +function moveActiveTab(args: ActiveEditorMoveArguments, control: IActiveEditor, accessor: ServicesAccessor): void { const group = control.group; let index = group.getIndexOfEditor(control.input); switch (args.to) { @@ -141,7 +141,7 @@ function moveActiveTab(args: ActiveEditorMoveArguments, control: IEditor, access group.moveEditor(control.input, group, { index }); } -function moveActiveEditorToGroup(args: ActiveEditorMoveArguments, control: IEditor, accessor: ServicesAccessor): void { +function moveActiveEditorToGroup(args: ActiveEditorMoveArguments, control: IActiveEditor, accessor: ServicesAccessor): void { const editorGroupService = accessor.get(IEditorGroupsService); const configurationService = accessor.get(IConfigurationService); diff --git a/src/vs/workbench/services/editor/common/editorService.ts b/src/vs/workbench/services/editor/common/editorService.ts index 462dd7f33a0963c8c46b698e613c5a36e7530419..9fe2e5df047817427d3a7774a1d05ddac79f6a60 100644 --- a/src/vs/workbench/services/editor/common/editorService.ts +++ b/src/vs/workbench/services/editor/common/editorService.ts @@ -39,6 +39,11 @@ export interface IOpenEditorOverride { override?: Promise; } +export interface IActiveEditor extends IEditor { + input: IEditorInput; + group: IEditorGroup; +} + export interface IEditorService { _serviceBrand: ServiceIdentifier; @@ -69,7 +74,7 @@ export interface IEditorService { * * @see `IEditorService.activeEditor` */ - readonly activeControl: IEditor; + readonly activeControl: IActiveEditor; /** * The currently active text editor widget or `undefined` if there is currently no active