Ugh, add settingsForScopeDescriptor back

It’s used by language mode and autocomplete for different things
This commit is contained in:
Ben Ogle
2014-10-02 14:34:02 -07:00
parent aedf02a3e3
commit 3732bdf1e9
3 changed files with 16 additions and 5 deletions

View File

@@ -30,11 +30,11 @@ class LanguageMode
# Returns an {Array} of the commented {Ranges}.
toggleLineCommentsForBufferRows: (start, end) ->
scopes = @editor.scopesForBufferPosition([start, 0])
properties = atom.config.get(scopes, "editor")
return unless properties.commentStart
properties = atom.config.settingsForScopeDescriptor(scopes, "editor.commentStart")[0]
return unless properties
commentStartString = properties.commentStart
commentEndString = properties.commentEnd
commentStartString = _.valueForKeyPath(properties, 'editor.commentStart')
commentEndString = _.valueForKeyPath(properties, 'editor.commentEnd')
return unless commentStartString