Move the logic for opening empty initial buffer to renderer

This commit is contained in:
Ben Ogle
2015-03-02 18:38:25 -08:00
parent 3296a3f9e8
commit 80cd20193a
3 changed files with 51 additions and 1 deletions

View File

@@ -605,6 +605,8 @@ class Atom extends Model
@setAutoHideMenuBar(newValue)
@setAutoHideMenuBar(true) if @config.get('core.autoHideMenuBar')
@openInitialEmptyEditorIfNecessary()
maximize = dimensions?.maximized and process.platform isnt 'darwin'
@displayWindow({maximize})
@@ -629,6 +631,10 @@ class Atom extends Model
@windowEventHandler?.unsubscribe()
openInitialEmptyEditorIfNecessary: ->
if @project.getPaths().length is 0 and @workspace.getPaneItems().length is 0
@workspace.open(null, {isInitialEmptyEditor: true})
###
Section: Messaging the User
###