From c4370d1887e15a46bdf62bccf079a95ad7233365 Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Tue, 22 Mar 2022 10:56:02 -0400 Subject: [PATCH] Fix #145685 --- src/vs/workbench/api/browser/mainThreadEditorTabs.ts | 2 +- src/vscode-dts/vscode.proposed.tabs.d.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/api/browser/mainThreadEditorTabs.ts b/src/vs/workbench/api/browser/mainThreadEditorTabs.ts index 29d2b3981639d..0363879077531 100644 --- a/src/vs/workbench/api/browser/mainThreadEditorTabs.ts +++ b/src/vs/workbench/api/browser/mainThreadEditorTabs.ts @@ -474,7 +474,7 @@ export class MainThreadEditorTabs implements MainThreadEditorTabsShape { } // Loop over keys of the groups map and call closeEditors for (const [group, editors] of groups) { - group.closeEditors(editors, { preserveFocus }); + await group.closeEditors(editors, { preserveFocus }); } } //#endregion diff --git a/src/vscode-dts/vscode.proposed.tabs.d.ts b/src/vscode-dts/vscode.proposed.tabs.d.ts index 13f9651291c94..8b21421fab730 100644 --- a/src/vscode-dts/vscode.proposed.tabs.d.ts +++ b/src/vscode-dts/vscode.proposed.tabs.d.ts @@ -141,6 +141,7 @@ declare module 'vscode' { /** * Closes the tab. This makes the tab object invalid and the tab * should no longer be used for further actions. + * Note: In the case of a dirty tab, a confirmation dialog will be shown which may be cancelled. If cancelled the tab is still valid * @param tab The tab to close, must be reference equal to a tab given by the API * @param preserveFocus When `true` focus will remain in its current position. If `false` it will jump to the next tab. */