mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Register editor with project when deserializing
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user