Call maintainConfig in buildTextEditor

This commit is contained in:
Max Brunsfeld
2016-07-12 14:16:55 -07:00
parent b1f5583c4e
commit 6fe4ce56c7
2 changed files with 8 additions and 4 deletions

View File

@@ -189,13 +189,15 @@ class AtomEnvironment extends Model
@commandInstaller = new CommandInstaller(@getVersion(), @applicationDelegate)
@textEditors = new TextEditorRegistry({@config})
@workspace = new Workspace({
@config, @project, packageManager: @packages, grammarRegistry: @grammars, deserializerManager: @deserializers,
notificationManager: @notifications, @applicationDelegate, @clipboard, viewRegistry: @views, assert: @assert.bind(this)
notificationManager: @notifications, @applicationDelegate, @clipboard, viewRegistry: @views, assert: @assert.bind(this),
textEditorRegistry: @textEditors,
})
@themes.workspace = @workspace
@textEditors = new TextEditorRegistry({@config})
@autoUpdater = new AutoUpdateManager({@applicationDelegate})
@config.load()

View File

@@ -31,7 +31,7 @@ class Workspace extends Model
{
@packageManager, @config, @project, @grammarRegistry, @notificationManager,
@clipboard, @viewRegistry, @grammarRegistry, @applicationDelegate, @assert,
@deserializerManager
@deserializerManager, @textEditorRegistry
} = params
@emitter = new Emitter
@@ -575,7 +575,9 @@ class Workspace extends Model
params = Object.assign({
@config, @clipboard, @grammarRegistry, @assert
}, params)
new TextEditor(params)
editor = new TextEditor(params)
@textEditorRegistry.maintainConfig(editor)
editor
# Public: Asynchronously reopens the last-closed item's URI if it hasn't already been
# reopened.