mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 19:44:25 +01:00
grid - add and use editorGroupToViewColumn
This commit is contained in:
@@ -13,7 +13,7 @@ import { ExtHostContext, ExtHostDocumentsAndEditorsShape, IModelAddedData, IText
|
||||
import { MainThreadTextEditor } from './mainThreadEditor';
|
||||
import { ITextFileService } from 'vs/workbench/services/textfile/common/textfiles';
|
||||
import { IEditorGroupsService } from 'vs/workbench/services/group/common/editorGroupsService';
|
||||
import { EditorViewColumn } from 'vs/workbench/api/shared/editor';
|
||||
import { EditorViewColumn, editorGroupToViewColumn } from 'vs/workbench/api/shared/editor';
|
||||
import { IEditor } from 'vs/workbench/common/editor';
|
||||
import { extHostCustomer } from 'vs/workbench/api/electron-browser/extHostCustomers';
|
||||
import { MainThreadDocuments } from 'vs/workbench/api/electron-browser/mainThreadDocuments';
|
||||
@@ -424,16 +424,12 @@ export class MainThreadDocumentsAndEditors {
|
||||
private _findEditorPosition(editor: MainThreadTextEditor): EditorViewColumn {
|
||||
for (let workbenchEditor of this._editorService.visibleControls) {
|
||||
if (editor.matches(workbenchEditor)) {
|
||||
return this.findEditorPosition(workbenchEditor);
|
||||
return editorGroupToViewColumn(this._editorGroupService, workbenchEditor.group);
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
findEditorPosition(workbenchEditor: IEditor): number {
|
||||
return this._editorGroupService.groups.indexOf(workbenchEditor.group);
|
||||
}
|
||||
|
||||
findTextEditorIdFor(editor: IEditor): string {
|
||||
for (let id in this._textEditors) {
|
||||
if (this._textEditors[id].matches(editor)) {
|
||||
|
||||
Reference in New Issue
Block a user