mirror of
https://github.com/atom/atom.git
synced 2026-02-08 13:45:09 -05:00
export 'open' explicitly pass in the file path to open.
This commit is contained in:
@@ -32,7 +32,9 @@ save = ->
|
||||
File.write filename, editor.getSession().getValue()
|
||||
setMode()
|
||||
Chrome.setDirty false
|
||||
open = ->
|
||||
exports.open = (path) ->
|
||||
filename = path
|
||||
|
||||
if Dir.isDir(filename)
|
||||
Process.cwd(filename)
|
||||
Chrome.title _.last filename.split('/')
|
||||
@@ -71,8 +73,7 @@ exports.bindKey = bindKey = (name, shortcut, callback) ->
|
||||
|
||||
bindKey 'open', 'Command-O', (env, args, request) ->
|
||||
if file = Chrome.openPanel()
|
||||
filename = file
|
||||
open()
|
||||
open(file)
|
||||
|
||||
bindKey 'openURL', 'Command-Shift-O', (env, args, request) ->
|
||||
if url = prompt "Enter URL:"
|
||||
|
||||
Reference in New Issue
Block a user