mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
Update tabs model to utilize the new API shape (#142668)
* Change shape of the tabs API * Disable tab tests for now * Add an onDidChangeTabGroup event * Optimize for group activate * Update events to no longer be an array * Further tab optimization
This commit is contained in:
@@ -953,14 +953,14 @@ export class ExtHostVariableResolverService extends AbstractVariableResolverServ
|
||||
if (activeEditor) {
|
||||
return activeEditor.document.uri;
|
||||
}
|
||||
const tabs = editorTabs.tabs.filter(tab => tab.isActive);
|
||||
if (tabs.length > 0) {
|
||||
const activeTab = editorTabs.tabGroups.all.find(group => group.isActive)?.activeTab;
|
||||
if (activeTab !== undefined) {
|
||||
// Resolve a resource from the tab
|
||||
const asSideBySideResource = tabs[0].resource as { primary?: URI; secondary?: URI } | undefined;
|
||||
const asSideBySideResource = activeTab.resource as { primary?: URI; secondary?: URI } | undefined;
|
||||
if (asSideBySideResource && (asSideBySideResource.primary || asSideBySideResource.secondary)) {
|
||||
return asSideBySideResource.primary ?? asSideBySideResource.secondary;
|
||||
} else {
|
||||
return tabs[0].resource as URI | undefined;
|
||||
return activeTab.resource as URI | undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user