Merge branch 'master' into ns-latest-telepath

This commit is contained in:
Nathan Sobo
2013-12-07 13:58:53 -08:00
6 changed files with 29 additions and 13 deletions

View File

@@ -125,11 +125,11 @@ class Config
#
# keyPath - The {String} name of the key to retrieve
# defaultValue - The integer {Number} to fall back to if the value isn't
# positive
# positive, defaults to 0.
#
# Returns the value from Atom's default settings, the user's configuration file,
# or `defaultValue` if the key value isn't greater than zero.
getPositiveInt: (keyPath, defaultValue) ->
getPositiveInt: (keyPath, defaultValue=0) ->
Math.max(@getInt(keyPath), 0) or defaultValue
# Public: Sets the value for a configuration setting.

View File

@@ -53,10 +53,13 @@ class ThemeManager
# the first/top theme to override later themes in the stack.
themeNames = _.clone(themeNames).reverse()
@refreshLessCache() # Update cache for packages in core.themes config
@packageManager.activatePackage(themeName) for themeName in themeNames
@refreshLessCache()
@refreshLessCache() # Update cache again now that @getActiveThemes() is populated
@loadUserStylesheet()
@reloadBaseStylesheets()
@emit('reloaded')
# Internal-only:

View File

@@ -50,6 +50,9 @@ class TokenizedBuffer
@subscribe @buffer, "changed", (e) => @handleBufferChange(e)
@subscribe @buffer, "path-changed", => @state.set('bufferPath', @buffer.getPath())
@subscribe atom.config.observe 'editor.tabLength', callNow: false, =>
@setTabLength(atom.config.getPositiveInt('editor.tabLength'))
@reloadGrammar()
serialize: -> @state.clone()