Remove instances of getPositiveInt()

This commit is contained in:
Ben Ogle
2014-09-25 14:01:50 -07:00
parent 94d470002b
commit e607d45f0d
2 changed files with 3 additions and 4 deletions

View File

@@ -439,7 +439,7 @@ class DisplayBuffer extends Model
getSoftWrapColumn: ->
if atom.config.get('editor.softWrapAtPreferredLineLength')
Math.min(@getEditorWidthInChars(), atom.config.getPositiveInt('editor.preferredLineLength', @getEditorWidthInChars()))
Math.min(@getEditorWidthInChars(), atom.config.get('editor.preferredLineLength'))
else
@getEditorWidthInChars()

View File

@@ -25,7 +25,7 @@ class TokenizedBuffer extends Model
constructor: ({@buffer, @tabLength, @invisibles}) ->
@emitter = new Emitter
@tabLength ?= atom.config.getPositiveInt('editor.tabLength', 2)
@tabLength ?= atom.config.get('editor.tabLength')
@subscribe atom.syntax.onDidAddGrammar(@grammarAddedOrUpdated)
@subscribe atom.syntax.onDidUpdateGrammar(@grammarAddedOrUpdated)
@@ -35,8 +35,7 @@ class TokenizedBuffer extends Model
@subscribe @$tabLength.changes, (tabLength) => @retokenizeLines()
@subscribe atom.config.observe 'editor.tabLength', callNow: false, =>
@setTabLength(atom.config.getPositiveInt('editor.tabLength', 2))
@subscribe atom.config.onDidChange 'editor.tabLength', (value) => @setTabLength(value)
@reloadGrammar()