aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/code/src/scopes.ts18
1 files changed, 7 insertions, 11 deletions
diff --git a/editors/code/src/scopes.ts b/editors/code/src/scopes.ts
index a099696a9..607b8b2dd 100644
--- a/editors/code/src/scopes.ts
+++ b/editors/code/src/scopes.ts
@@ -85,17 +85,13 @@ function loadThemeFile(themePath: string) {
85 } 85 }
86 } 86 }
87} 87}
88function mergeRuleSettings(defaultRule: TextMateRuleSettings, override: TextMateRuleSettings): TextMateRuleSettings { 88function mergeRuleSettings(defaultSetting: TextMateRuleSettings, override: TextMateRuleSettings): TextMateRuleSettings {
89 const mergedRule = defaultRule; 89 const mergedRule = defaultSetting;
90 if (override.background) { 90
91 mergedRule.background = override.background 91 mergedRule.background = override.background || defaultSetting.background
92 } 92 mergedRule.foreground = override.foreground || defaultSetting.foreground
93 if (override.foreground) { 93 mergedRule.fontStyle = override.fontStyle || defaultSetting.foreground;
94 mergedRule.foreground = override.foreground 94
95 }
96 if (override.background) {
97 mergedRule.fontStyle = override.fontStyle
98 }
99 return mergedRule; 95 return mergedRule;
100} 96}
101 97