Making it clear we're using default settings.

This commit is contained in:
Seivan Heidari 2019-10-24 18:33:36 +02:00
parent e6df4c424a
commit b59ffb7d41

View file

@ -85,17 +85,13 @@ function loadThemeFile(themePath: string) {
}
}
}
function mergeRuleSettings(defaultRule: TextMateRuleSettings, override: TextMateRuleSettings): TextMateRuleSettings {
const mergedRule = defaultRule;
if (override.background) {
mergedRule.background = override.background
}
if (override.foreground) {
mergedRule.foreground = override.foreground
}
if (override.background) {
mergedRule.fontStyle = override.fontStyle
}
function mergeRuleSettings(defaultSetting: TextMateRuleSettings, override: TextMateRuleSettings): TextMateRuleSettings {
const mergedRule = defaultSetting;
mergedRule.background = override.background || defaultSetting.background
mergedRule.foreground = override.foreground || defaultSetting.foreground
mergedRule.fontStyle = override.fontStyle || defaultSetting.foreground;
return mergedRule;
}