mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Use editor.softWrap config value when creating edit sessions
Closes #666
This commit is contained in:
@@ -66,10 +66,18 @@ describe "Project", ->
|
||||
Project.unregisterOpener(barOpener)
|
||||
|
||||
describe "when passed a path that doesn't match a custom opener", ->
|
||||
it "creates the edit session with the configured `editor.tabLength` setting", ->
|
||||
it "creates the edit session with the configured `editor.tabLength` and `editor.softWrap` settings", ->
|
||||
config.set('editor.tabLength', 4)
|
||||
editSession = project.open('a')
|
||||
expect(editSession.getTabLength()).toBe 4
|
||||
config.set('editor.softWrap', true)
|
||||
editSession1 = project.open('a')
|
||||
expect(editSession1.getTabLength()).toBe 4
|
||||
expect(editSession1.getSoftWrap()).toBe true
|
||||
|
||||
config.set('editor.tabLength', 100)
|
||||
config.set('editor.softWrap', false)
|
||||
editSession2 = project.open('b')
|
||||
expect(editSession2.getTabLength()).toBe 100
|
||||
expect(editSession2.getSoftWrap()).toBe false
|
||||
|
||||
describe "when given an absolute path that hasn't been opened previously", ->
|
||||
it "returns a new edit session for the given path and emits 'buffer-created' and 'edit-session-created' events", ->
|
||||
|
||||
Reference in New Issue
Block a user