diff --git a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts index b67c3c3b42f08fd8ec7a419ce3cbd49d3ef1601a..c1be24873f7e6fd3c73e2f47d4b7a5bdc4f0ddc8 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupsControl.ts @@ -40,7 +40,6 @@ import { ResourcesDropHandler, LocalSelectionTransfer, DraggedEditorIdentifier } import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { IPartService } from 'vs/workbench/services/part/common/partService'; - export enum Rochade { NONE, TWO_TO_ONE, @@ -1062,7 +1061,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro this.centeredEditorLeftMarginRatio = 0.5; // Restore centered layout position and size - const centeredLayoutDataString = this.storageService.get(EditorGroupsControl.CENTERED_EDITOR_LAYOUT_DATA_STORAGE_KEY, StorageScope.GLOBAL); + const centeredLayoutDataString = this.storageService.get(EditorGroupsControl.CENTERED_EDITOR_LAYOUT_DATA_STORAGE_KEY, StorageScope.WORKSPACE); if (centeredLayoutDataString) { const centeredLayout = JSON.parse(centeredLayoutDataString); this.centeredEditorLeftMarginRatio = centeredLayout.leftMarginRatio; @@ -1974,7 +1973,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro leftMarginRatio: this.centeredEditorLeftMarginRatio, size: this.centeredEditorSize }; - this.storageService.store(EditorGroupsControl.CENTERED_EDITOR_LAYOUT_DATA_STORAGE_KEY, JSON.stringify(data), StorageScope.GLOBAL); + this.storageService.store(EditorGroupsControl.CENTERED_EDITOR_LAYOUT_DATA_STORAGE_KEY, JSON.stringify(data), StorageScope.WORKSPACE); } public getVerticalSashTop(sash: Sash): number { @@ -2219,7 +2218,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro if (layout) { this.layoutContainers(); } - this.storageService.remove(EditorGroupsControl.CENTERED_EDITOR_LAYOUT_DATA_STORAGE_KEY, StorageScope.GLOBAL); + this.storageService.remove(EditorGroupsControl.CENTERED_EDITOR_LAYOUT_DATA_STORAGE_KEY, StorageScope.WORKSPACE); } public getInstantiationService(position: Position): IInstantiationService { diff --git a/src/vs/workbench/electron-browser/workbench.ts b/src/vs/workbench/electron-browser/workbench.ts index 3523c79cce5169cb229205ce95f64193eeaa6ef2..da94b87236ea135d0d3767eab3d748917e633dd6 100644 --- a/src/vs/workbench/electron-browser/workbench.ts +++ b/src/vs/workbench/electron-browser/workbench.ts @@ -405,7 +405,7 @@ export class Workbench implements IPartService { } // Restore Forced Editor Center Mode - if (this.storageService.getBoolean(Workbench.centeredEditorLayoutActiveStorageKey, StorageScope.GLOBAL, false)) { + if (this.storageService.getBoolean(Workbench.centeredEditorLayoutActiveStorageKey, StorageScope.WORKSPACE, false)) { this.centeredEditorLayoutActive = true; } @@ -1415,7 +1415,7 @@ export class Workbench implements IPartService { public centerEditorLayout(active: boolean, skipLayout?: boolean): void { this.centeredEditorLayoutActive = active; - this.storageService.store(Workbench.centeredEditorLayoutActiveStorageKey, this.centeredEditorLayoutActive, StorageScope.GLOBAL); + this.storageService.store(Workbench.centeredEditorLayoutActiveStorageKey, this.centeredEditorLayoutActive, StorageScope.WORKSPACE); if (!skipLayout) { this.layout();