Refactor Configuration Migration Logic (#198414)

* fix migration #198056
This commit is contained in:
Benjamin Simmonds 2023-11-16 14:27:18 +01:00 committed by GitHub
parent cfd52679ce
commit a6469cae57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View file

@ -165,11 +165,10 @@
"src/vs/workbench/workbench.web.main.ts",
"src/vs/workbench/api/common/extHostTypes.ts"
],
// Temporarily enabled for self-hosting
"terminal.integrated.stickyScroll.enabled": true,
// Temporarily enabled for self-hosting
"scm.showIncomingChanges": "always",
"scm.showOutgoingChanges": "always"
"scm.showOutgoingChanges": "always",
"workbench.editor.showTabs": "multiple",
}

View file

@ -817,17 +817,21 @@ Registry.as<IConfigurationMigrationRegistry>(Extensions.ConfigurationMigration)
Registry.as<IConfigurationMigrationRegistry>(Extensions.ConfigurationMigration)
.registerConfigurationMigrations([{
key: 'workbench.editor.doubleClickTabToToggleEditorGroupSizes', migrateFn: (value: any) => {
const results: ConfigurationKeyValuePairs = [];
if (typeof value === 'boolean') {
value = value ? 'expand' : 'off';
results.push(['workbench.editor.doubleClickTabToToggleEditorGroupSizes', { value }]);
}
return [['workbench.editor.doubleClickTabToToggleEditorGroupSizes', { value: value }]];
return results;
}
}, {
key: LayoutSettings.EDITOR_TABS_MODE, migrateFn: (value: any) => {
const results: ConfigurationKeyValuePairs = [];
if (typeof value === 'boolean') {
value = value ? EditorTabsMode.MULTIPLE : EditorTabsMode.SINGLE;
results.push([LayoutSettings.EDITOR_TABS_MODE, { value }]);
}
return [[LayoutSettings.EDITOR_TABS_MODE, { value }]];
return results;
}
}, {
key: 'workbench.editor.tabCloseButton', migrateFn: (value: any) => {