mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user