Only focus if the document can open the path

This commit is contained in:
Corey Johnson
2011-11-10 15:05:21 -08:00
parent 35a78425c9
commit 444aa3f6cd

View File

@@ -13,7 +13,6 @@ windowAdditions =
@setTitle (_.last @path.split '/') or 'Untitled Document'
$atomController.window.makeKeyWindow
atom.trigger 'window:load'
shutdown: ->
@@ -28,8 +27,8 @@ windowAdditions =
OSX.NSApp.createController @path
open: (path) ->
$atomController.window.makeKeyAndOrderFront $atomController
if atom.document.open path
$atomController.window.makeKeyAndOrderFront $atomController
atom.trigger 'window:open', path
else
atom.app.open path