Merge pull request #4606 from atom/ns-use-global-selector-in-config

Use `*` instead of `global` as the global selector in user settings
This commit is contained in:
Nathan Sobo
2014-12-30 16:37:09 -06:00
2 changed files with 14 additions and 10 deletions

View File

@@ -837,7 +837,7 @@ class Config
console.error detail
save: ->
allSettings = global: @settings
allSettings = {'*': @settings}
allSettings = _.extend allSettings, @scopedSettingsStore.propertiesForSource(@getUserConfigPath())
CSON.writeFileSync(@configFilePath, allSettings)
@@ -852,9 +852,13 @@ class Config
return
if newSettings.global?
newSettings['*'] = newSettings.global
delete newSettings.global
if newSettings['*']?
scopedSettings = newSettings
newSettings = newSettings.global
delete scopedSettings.global
newSettings = newSettings['*']
delete scopedSettings['*']
@resetUserScopedSettings(scopedSettings)
@transact =>