mirror of
https://github.com/atom/atom.git
synced 2026-02-12 15:45:23 -05:00
Move the logic for opening empty initial buffer to renderer
This commit is contained in:
@@ -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
|
||||
###
|
||||
|
||||
Reference in New Issue
Block a user