Skip to content

Commit 74df98f

Browse files
fix: select theme according to current color theme in dev mode (microsoft#190035)
* fix: select theme according to current color theme * fix: select theme according to current color theme and write configuration --------- Co-authored-by: ermin.zem <[email protected]>
1 parent 3369508 commit 74df98f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/vs/workbench/services/themes/browser/workbenchThemeService.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ export class WorkbenchThemeService implements IWorkbenchThemeService {
208208
const initializeColorTheme = async () => {
209209
const devThemes = this.colorThemeRegistry.findThemeByExtensionLocation(extDevLoc);
210210
if (devThemes.length) {
211-
return this.setColorTheme(devThemes[0].id, ConfigurationTarget.MEMORY);
211+
const matchedColorTheme = devThemes.find(theme => theme.type === this.currentColorTheme.type);
212+
return this.setColorTheme(matchedColorTheme ? matchedColorTheme.id : devThemes[0].id, undefined);
212213
}
213214

214215
const preferredColorScheme = this.getPreferredColorScheme();

0 commit comments

Comments
 (0)