Rename callbackImmediately option to callNow

This commit is contained in:
Kevin Sawicki 2013-08-23 09:25:07 -07:00
parent 08b80c15ad
commit c2b3c2e3aa
2 changed files with 5 additions and 5 deletions

View File

@ -177,10 +177,10 @@ class Config
# Establishes an event listener for a given key.
#
# `callback` is fired whenever the value of the key is changed and will
# be fired immediately unless the `callbackImmediately` option is `false`.
# be fired immediately unless the `callNow` option is `false`.
#
# keyPath - The {String} name of the key to watch
# options - An optional {Object} containing the `callbackImmediately` key.
# options - An optional {Object} containing the `callNow` key.
# callback - The {Function} that fires when the. It is given a single argument, `value`,
# which is the new value of `keyPath`.
observe: (keyPath, options={}, callback) ->
@ -198,7 +198,7 @@ class Config
subscription = { cancel: => @off 'updated', updateCallback }
@on 'updated', updateCallback
callback(value) if options.callbackImmediately ? true
callback(value) if options.callNow ? true
subscription
### Internal ###

View File

@ -56,10 +56,10 @@ class DisplayBuffer
@trigger 'soft-wrap-changed', newValue
@updateWrappedScreenLines()
@observeConfig 'editor.preferredLineLength', callbackImmediately: false, =>
@observeConfig 'editor.preferredLineLength', callNow: false, =>
@updateWrappedScreenLines() if @getSoftWrap() and config.get('editor.softWrapAtPreferredLineLength')
@observeConfig 'editor.softWrapAtPreferredLineLength', callbackImmediately: false, =>
@observeConfig 'editor.softWrapAtPreferredLineLength', callNow: false, =>
@updateWrappedScreenLines() if @getSoftWrap()
serialize: -> @state.clone()