diff --git a/src/vs/workbench/browser/parts/editor/editor.ts b/src/vs/workbench/browser/parts/editor/editor.ts index a0edbc678d6..6a462490090 100644 --- a/src/vs/workbench/browser/parts/editor/editor.ts +++ b/src/vs/workbench/browser/parts/editor/editor.ts @@ -80,6 +80,14 @@ export function getEditorPartOptions(configurationService: IConfigurationService } } + // showTabs ensure correct enum value + if (typeof options.showTabs === 'boolean') { + // Migration service kicks in very late and can cause a flicker otherwise + options.showTabs = options.showTabs ? 'multiple' : 'single'; + } else if (options.showTabs !== 'multiple' && options.showTabs !== 'single' && options.showTabs !== 'none') { + options.showTabs = 'multiple'; + } + const windowConfig = configurationService.getValue(); if (windowConfig?.window?.density?.editorTabHeight) { options.tabHeight = windowConfig.window.density.editorTabHeight; diff --git a/src/vs/workbench/browser/workbench.contribution.ts b/src/vs/workbench/browser/workbench.contribution.ts index de682c9af53..6cc79eea671 100644 --- a/src/vs/workbench/browser/workbench.contribution.ts +++ b/src/vs/workbench/browser/workbench.contribution.ts @@ -766,3 +766,14 @@ Registry.as(Extensions.ConfigurationMigration) return result; } }]); + +Registry.as(Extensions.ConfigurationMigration) + .registerConfigurationMigrations([{ + key: 'workbench.editor.showTabs', migrateFn: (value: any) => { + const result: ConfigurationKeyValuePairs = [['workbench.editor.showTabs', { value: value }]]; + if (value === false) { + result.push(['workbench.editor.showTabs', { value: 'single' }]); + } + return result; + } + }]);