Merge pull request #9198 from alexchandel/patch-1

permit any whole number for tabLength
This commit is contained in:
Ben Ogle
2016-02-10 11:53:54 -08:00
2 changed files with 10 additions and 1 deletions

View File

@@ -139,6 +139,15 @@ describe "TextEditor", ->
expect(editor2.getSoftTabs()).toBe true
expect(editor2.getEncoding()).toBe 'macroman'
atom.config.set('editor.tabLength', -1)
expect(editor2.getTabLength()).toBe 1
atom.config.set('editor.tabLength', 2)
expect(editor2.getTabLength()).toBe 2
atom.config.set('editor.tabLength', 17)
expect(editor2.getTabLength()).toBe 17
atom.config.set('editor.tabLength', 128)
expect(editor2.getTabLength()).toBe 128
it "uses scoped `core.fileEncoding` values", ->
editor1 = null
editor2 = null

View File

@@ -171,7 +171,7 @@ module.exports =
tabLength:
type: 'integer'
default: 2
enum: [1, 2, 3, 4, 6, 8]
minimum: 1
description: 'Number of spaces used to represent a tab.'
softWrap:
type: 'boolean'