mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Serialize TextBuffer inside EditSession serialize
This commit is contained in:
committed by
Nathan Sobo
parent
693d8258ad
commit
cc87595e4e
@@ -87,9 +87,6 @@ class Project
|
||||
buildEditSession: (filePath, editSessionOptions={}) ->
|
||||
@buildEditSessionForBuffer(@bufferForPath(filePath), editSessionOptions)
|
||||
|
||||
buildEditSessionFromState: (state, editSessionOptions={}) ->
|
||||
@buildEditSessionForBuffer(@bufferForState(state), editSessionOptions)
|
||||
|
||||
buildEditSessionForBuffer: (buffer, editSessionOptions) ->
|
||||
options = _.extend(@defaultEditSessionOptions(), editSessionOptions)
|
||||
options.project = this
|
||||
@@ -141,11 +138,6 @@ class Project
|
||||
else
|
||||
@buildBuffer()
|
||||
|
||||
bufferForState: (state) ->
|
||||
buffer = @buildBuffer()
|
||||
buffer.setText(state) if state
|
||||
buffer
|
||||
|
||||
buildBuffer: (filePath) ->
|
||||
buffer = new Buffer(filePath, this)
|
||||
@buffers.push buffer
|
||||
|
||||
Reference in New Issue
Block a user