This commit is contained in:
Logan Ramos
2022-03-15 09:55:57 -04:00
parent 037fd05f03
commit ed5a545047
5 changed files with 8 additions and 11 deletions

View File

@@ -612,7 +612,7 @@ export interface ExtHostEditorInsetsShape {
export interface MainThreadEditorTabsShape extends IDisposable {
// manage tabs: move, close, rearrange etc
$moveTab(tab: IEditorTabDto, index: number, viewColumn: EditorGroupColumn): void;
$closeTab(tab: IEditorTabDto): Promise<void>;
$closeTab(tab: IEditorTabDto, preserveFocus: boolean): Promise<void>;
}
export interface IEditorTabGroupDto {

View File

@@ -22,7 +22,7 @@ export interface IEditorTab {
isDirty: boolean;
additionalResourcesAndViewTypes: { resource: vscode.Uri | undefined; viewType: string | undefined }[];
move(index: number, viewColumn: ViewColumn): Promise<void>;
close(): Promise<void>;
close(preserveFocus: boolean): Promise<void>;
}
export interface IEditorTabGroup {
@@ -122,13 +122,11 @@ export class ExtHostEditorTabs implements IExtHostEditorTabs {
move: async (index: number, viewColumn: ViewColumn) => {
this._proxy.$moveTab(tabDto, index, typeConverters.ViewColumn.from(viewColumn));
// TODO: Need an on did change tab event at the group level
// await raceTimeout(Event.toPromise(this._onDidChangeTabs.event), 1000);
return;
},
close: async () => {
await this._proxy.$closeTab(tabDto);
close: async (preserveFocus) => {
await this._proxy.$closeTab(tabDto, preserveFocus);
// TODO: Need an on did change tab event at the group level
// await raceTimeout(Event.toPromise(this._onDidChangeTabs.event), 1000);
return;
}
});