mirror of
https://github.com/atom/atom.git
synced 2026-01-22 13:28:01 -05:00
Remove instances of getPositiveInt()
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user