aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src
diff options
context:
space:
mode:
authorSeivan Heidari <[email protected]>2019-10-24 17:33:36 +0100
committerSeivan Heidari <[email protected]>2019-10-24 17:33:36 +0100
commitb59ffb7d417ba978087a1663c002256d684ae49a (patch)
tree9a63058d707335b7b67bd6dfa1b67964d5b0632a /editors/code/src
parente6df4c424ad8a938fca849b8b4511a7e32f8cd17 (diff)
Making it clear we're using default settings.
Diffstat (limited to 'editors/code/src')
-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