mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-11 11:15:24 +03:00
export 'open' explicitly pass in the file path to open.
This commit is contained in:
parent
bbae26312c
commit
01ed2ce204
@ -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:"
|
||||
|
Loading…
Reference in New Issue
Block a user