Return items from the opener, rather than using open

This way, options like `split: ‘left’` can be used with the config
URIs.
This commit is contained in:
Ben Ogle
2015-02-12 10:43:35 -08:00
parent dcbff35ef5
commit 4a20dc9079

View File

@@ -66,16 +66,16 @@ class Workspace extends Model
@subscribeToActiveItem()
@addOpener (filePath) =>
@addOpener (filePath) ->
switch filePath
when 'atom://.atom/stylesheet'
@open(atom.styles.getUserStyleSheetPath())
atom.project.open(atom.styles.getUserStyleSheetPath())
when 'atom://.atom/keymap'
@open(atom.keymaps.getUserKeymapPath())
atom.project.open(atom.keymaps.getUserKeymapPath())
when 'atom://.atom/config'
@open(atom.config.getUserConfigPath())
atom.project.open(atom.config.getUserConfigPath())
when 'atom://.atom/init-script'
@open(atom.getUserInitScriptPath())
atom.project.open(atom.getUserInitScriptPath())
atom.views.addViewProvider Workspace, (model) ->
new WorkspaceElement().initialize(model)