mirror of
https://github.com/atom/atom.git
synced 2026-02-06 12:44:59 -05:00
Pass tabText into EditSession explicitly on construction
This commit is contained in:
@@ -15,6 +15,7 @@ class EditSession
|
||||
session = new EditSession(
|
||||
editor: editor
|
||||
buffer: buffer
|
||||
tabText: editor.tabText
|
||||
autoIndent: editor.autoIndent
|
||||
softTabs: editor.softTabs
|
||||
)
|
||||
@@ -31,10 +32,9 @@ class EditSession
|
||||
autoIndent: true
|
||||
softTabs: true
|
||||
|
||||
constructor: ({@editor, @buffer, @autoIndent}) ->
|
||||
constructor: ({@editor, @buffer, @tabText, @autoIndent}) ->
|
||||
@id = @constructor.idCounter++
|
||||
@tabText = @editor.tabText
|
||||
@renderer = new Renderer(@buffer, { softWrapColumn: @editor.calcSoftWrapColumn(), tabText: @editor.tabText })
|
||||
@renderer = new Renderer(@buffer, { softWrapColumn: @editor.calcSoftWrapColumn(), tabText: @tabText })
|
||||
@cursors = []
|
||||
@selections = []
|
||||
@addCursorAtScreenPosition([0, 0])
|
||||
|
||||
@@ -354,7 +354,13 @@ class Editor extends View
|
||||
index = @editSessionIndexForBuffer(buffer)
|
||||
unless index?
|
||||
index = @editSessions.length
|
||||
@editSessions.push(new EditSession(editor: this, buffer: buffer, autoIndent: @autoIndent, softTabs: @softTabs))
|
||||
@editSessions.push(new EditSession(
|
||||
editor: this
|
||||
buffer: buffer
|
||||
tabText: @tabText
|
||||
autoIndent: @autoIndent
|
||||
softTabs: @softTabs
|
||||
))
|
||||
|
||||
@setActiveEditSessionIndex(index)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user