mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Only focus if the document can open the path
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user