Skip to content

Commit

Permalink
ext dev - preserve last active view (#214992)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Jun 12, 2024
1 parent 39ae41a commit c095702
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/vs/workbench/browser/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,11 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi

// Only restore last viewlet if window was reloaded or we are in development mode
let viewContainerToRestore: string | undefined;
if (!this.environmentService.isBuilt || lifecycleService.startupKind === StartupKind.ReloadedWindow) {
if (
!this.environmentService.isBuilt ||
lifecycleService.startupKind === StartupKind.ReloadedWindow ||
this.environmentService.isExtensionDevelopment && !this.environmentService.extensionTestsLocationURI
) {
viewContainerToRestore = this.storageService.get(SidebarPart.activeViewletSettingsKey, StorageScope.WORKSPACE, this.viewDescriptorService.getDefaultViewContainer(ViewContainerLocation.Sidebar)?.id);
} else {
viewContainerToRestore = this.viewDescriptorService.getDefaultViewContainer(ViewContainerLocation.Sidebar)?.id;
Expand Down

0 comments on commit c095702

Please sign in to comment.