Registry for editors

This commit is contained in:
Willem Van Lint
2016-02-26 16:20:39 -05:00
parent 92dea0379a
commit 26cf7f081f
5 changed files with 85 additions and 2 deletions

View File

@@ -558,7 +558,10 @@ class Workspace extends Model
@config, @notificationManager, @packageManager, @clipboard, @viewRegistry,
@grammarRegistry, @project, @assert, @applicationDelegate
}, params)
new TextEditor(params)
editor = new TextEditor(params)
disposable = atom.textEditors.add(editor)
editor.onDidDestroy -> disposable.dispose()
editor
# Public: Asynchronously reopens the last-closed item's URI if it hasn't already been
# reopened.