## 1.117.0
This commit is contained in:
@ -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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user