Take 'scope' option in Config::onDidChange

Deprecate passing the scope as an optional first argument
This commit is contained in:
Max Brunsfeld
2014-12-16 09:44:36 -08:00
parent 4e4794f3fd
commit 2cea51b50e
5 changed files with 56 additions and 14 deletions

View File

@@ -87,7 +87,7 @@ class TokenizedBuffer extends Model
@configSettings = tabLength: atom.config.get('editor.tabLength', scope: @rootScopeDescriptor)
@grammarTabLengthSubscription?.dispose()
@grammarTabLengthSubscription = atom.config.onDidChange @rootScopeDescriptor, 'editor.tabLength', ({newValue}) =>
@grammarTabLengthSubscription = atom.config.onDidChange 'editor.tabLength', scope: @rootScopeDescriptor, ({newValue}) =>
@configSettings.tabLength = newValue
@retokenizeLines()
@subscribe @grammarTabLengthSubscription