## 1.117.0

This commit is contained in:
2025-02-27 09:31:28 -07:00
parent ab334f91dc
commit d649b52345
4 changed files with 15 additions and 8 deletions

View File

@ -60,8 +60,10 @@ async function openInNewWindowLogic(): Promise<any> {
vscode.window.showInformationMessage("Open a tab first!");
return;
}
const activeTabLabel = vscode.window.tabGroups.activeTabGroup.activeTab.label;
const paramCaseActiveTabLabel: string = paramCase(activeTabLabel);
const activeTab = vscode.window.tabGroups.activeTabGroup.activeTab;
const tabs: vscode.Tab[] = vscode.window.tabGroups.all.map(tagGroup => tagGroup.tabs).flat();
const index = tabs.findIndex(tab => tab.label === activeTab.label);
const paramCaseActiveTabLabel: string = paramCase(activeTab.label);
vscode.window.showInformationMessage(`Searching for <${paramCaseActiveTabLabel}>`);
const fileUris: vscode.Uri[] = await vscode.workspace.findFiles(`**/${paramCaseActiveTabLabel}*`);
if (fileUris.length === 0) {
@ -97,6 +99,9 @@ async function openInNewWindowLogic(): Promise<any> {
if (!found) {
updateWithLogic(textDocument);
}
else if (index !== -1) {
await vscode.window.tabGroups.close(tabs[index]);
}
}
}