diff --git a/src/text-editor.coffee b/src/text-editor.coffee index 1174fb4b2..c986408c5 100644 --- a/src/text-editor.coffee +++ b/src/text-editor.coffee @@ -55,7 +55,6 @@ GutterContainer = require './gutter-container' module.exports = class TextEditor extends Model callDisplayBufferCreatedHook: false - registerEditor: false buffer: null languageMode: null cursors: null @@ -76,8 +75,7 @@ class TextEditor extends Model state.displayBuffer = displayBuffer state.config = atomEnvironment.config - staet.notificationManager = atomEnvironment.notifications - state.registerEditor = true + state.notificationManager = atomEnvironment.notifications new this(state) constructor: (params={}) -> @@ -85,9 +83,8 @@ class TextEditor extends Model { @softTabs, @scrollRow, @scrollColumn, initialLine, initialColumn, tabLength, - softWrapped, @displayBuffer, buffer, registerEditor, suppressCursorCreation, - @mini, @placeholderText, lineNumberGutterVisible, largeFileMode, @config, - @notificationManager + softWrapped, @displayBuffer, buffer, suppressCursorCreation, @mini, @placeholderText, + lineNumberGutterVisible, largeFileMode, @config, @notificationManager } = params @emitter = new Emitter @@ -122,8 +119,6 @@ class TextEditor extends Model priority: 0 visible: lineNumberGutterVisible - atom.workspace?.editorAdded(this) if registerEditor - serialize: -> deserializer: 'TextEditor' id: @id @@ -465,7 +460,7 @@ class TextEditor extends Model softTabs = @getSoftTabs() newEditor = new TextEditor({ @buffer, displayBuffer, @tabLength, softTabs, suppressCursorCreation: true, - registerEditor: true, @config, @notificationManager + @config, @notificationManager }) for marker in @findMarkers(editorId: @id) marker.copy(editorId: newEditor.id, preserveFolds: true) diff --git a/src/workspace.coffee b/src/workspace.coffee index 26d662257..6ad73b607 100644 --- a/src/workspace.coffee +++ b/src/workspace.coffee @@ -88,8 +88,6 @@ class Workspace extends Model _.uniq(packageNames) - editorAdded: (editor) -> - subscribeToActiveItem: -> @updateWindowTitle() @updateDocumentEdited()