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
2 changed files with 8 additions and 5 deletions

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) => {