mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-01 05:51:32 +01:00
Have onDidChangeTab return an array
This commit is contained in:
@@ -177,7 +177,7 @@ export class ExtHostEditorTabs implements IExtHostEditorTabs {
|
||||
readonly _serviceBrand: undefined;
|
||||
|
||||
private readonly _proxy: MainThreadEditorTabsShape;
|
||||
private readonly _onDidChangeTab = new Emitter<vscode.Tab>();
|
||||
private readonly _onDidChangeTab = new Emitter<vscode.Tab[]>();
|
||||
private readonly _onDidChangeTabGroup = new Emitter<void>();
|
||||
private readonly _onDidChangeActiveTabGroup = new Emitter<vscode.TabGroup>();
|
||||
|
||||
@@ -199,7 +199,7 @@ export class ExtHostEditorTabs implements IExtHostEditorTabs {
|
||||
// never changes -> simple value
|
||||
onDidChangeTabGroup: that._onDidChangeTabGroup.event,
|
||||
onDidChangeActiveTabGroup: that._onDidChangeActiveTabGroup.event,
|
||||
onDidChangeTab: that._onDidChangeTab.event,
|
||||
onDidChangeTabs: that._onDidChangeTab.event,
|
||||
// dynamic -> getters
|
||||
get groups() {
|
||||
return Object.freeze(that._extHostTabGroups.map(group => group.apiObject));
|
||||
@@ -284,6 +284,6 @@ export class ExtHostEditorTabs implements IExtHostEditorTabs {
|
||||
throw new Error('Update Tabs IPC call received before group creation.');
|
||||
}
|
||||
const tab = group.acceptTabDtoUpdate(tabDto);
|
||||
this._onDidChangeTab.fire(tab.apiObject);
|
||||
this._onDidChangeTab.fire([tab.apiObject]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user