@@ -55,7 +55,7 @@ export class ColorThemeData implements IColorTheme {
5555 private colorMap : IColorMap = { } ;
5656 private customColorMap : IColorMap = { } ;
5757
58- private tokenStylingRules : TokenStylingRule [ ] | undefined = undefined ;
58+ private tokenStylingRules : TokenStylingRule [ ] | undefined = undefined ; // undefined if the theme has no tokenStylingRules section
5959 private customTokenStylingRules : TokenStylingRule [ ] = [ ] ;
6060
6161 private themeTokenScopeMatchers : Matcher < ProbeScope > [ ] | undefined ;
@@ -305,6 +305,7 @@ export class ColorThemeData implements IColorTheme {
305305
306306 this . tokenColorIndex = undefined ;
307307 this . textMateThemingRules = undefined ;
308+ this . customTokenScopeMatchers = undefined ;
308309 }
309310
310311 private overwriteCustomColors ( colors : IColorCustomizations ) {
@@ -318,7 +319,7 @@ export class ColorThemeData implements IColorTheme {
318319
319320 public setCustomTokenColors ( customTokenColors : ITokenColorCustomizations ) {
320321 this . customTokenColors = [ ] ;
321- this . customTokenScopeMatchers = undefined ;
322+
322323 // first add the non-theme specific settings
323324 this . addCustomTokenColors ( customTokenColors ) ;
324325
@@ -330,6 +331,7 @@ export class ColorThemeData implements IColorTheme {
330331
331332 this . tokenColorIndex = undefined ;
332333 this . textMateThemingRules = undefined ;
334+ this . customTokenScopeMatchers = undefined ;
333335 }
334336
335337 public setCustomTokenStyleRules ( tokenStylingRules : IExperimentalTokenStyleCustomizations ) {
@@ -383,9 +385,7 @@ export class ColorThemeData implements IColorTheme {
383385 return Promise . resolve ( undefined ) ;
384386 }
385387 this . themeTokenColors = [ ] ;
386- this . themeTokenScopeMatchers = undefined ;
387- this . tokenColorIndex = undefined ;
388- this . textMateThemingRules = undefined ;
388+ this . clearCaches ( ) ;
389389
390390 const result = {
391391 colors : { } ,
0 commit comments