Register editor with project when deserializing

This commit is contained in:
Kevin Sawicki
2013-12-11 17:17:50 -08:00
parent 344e6d15ce
commit 3cb751723d

View File

@@ -44,6 +44,7 @@ class Editor extends Model
deserializing: false
callDisplayBufferCreatedHook: false
registerEditor: false
buffer: null
languageMode: null
cursors: null
@@ -60,6 +61,7 @@ class Editor extends Model
if @deserializing
@deserializing = false
@callDisplayBufferCreatedHook = true
@registerEditor = true
return
@cursors = []
@@ -93,6 +95,8 @@ class Editor extends Model
@subscribe @$scrollTop, 'value', (scrollTop) => @emit 'scroll-top-changed', scrollTop
@subscribe @$scrollLeft, 'value', (scrollLeft) => @emit 'scroll-left-changed', scrollLeft
atom.project.addEditor(this) if @registerEditor
# Deprecated: The goal is a world where we don't call serialize explicitly
serialize: -> this