mirror of
https://github.com/atom/atom.git
synced 2026-02-11 15:14:59 -05:00
Project.open returns an editSession instead of a buffer.
First step in removing the coupling of Editor and Buffer. Editor should get all information about the active buffer from the activeEditSession.
This commit is contained in:
@@ -11,13 +11,7 @@ class EditSession
|
||||
@idCounter: 1
|
||||
|
||||
@deserialize: (state, editor, rootView) ->
|
||||
buffer = Buffer.deserialize(state.buffer, rootView.project)
|
||||
session = new EditSession(
|
||||
buffer: buffer
|
||||
tabText: editor.tabText
|
||||
autoIndent: editor.autoIndent
|
||||
softTabs: editor.softTabs
|
||||
)
|
||||
session = rootView.project.open(state.buffer)
|
||||
session.setScrollTop(state.scrollTop)
|
||||
session.setScrollLeft(state.scrollLeft)
|
||||
session.setCursorScreenPosition(state.cursorScreenPosition)
|
||||
@@ -54,7 +48,7 @@ class EditSession
|
||||
@displayBuffer.destroy()
|
||||
|
||||
serialize: ->
|
||||
buffer: @buffer.serialize()
|
||||
buffer: @buffer.getPath()
|
||||
scrollTop: @getScrollTop()
|
||||
scrollLeft: @getScrollLeft()
|
||||
cursorScreenPosition: @getCursorScreenPosition().serialize()
|
||||
|
||||
Reference in New Issue
Block a user