Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Open empty editor as a pending pane item #13760

Merged
merged 9 commits into from Apr 29, 2019
Merged
2 changes: 1 addition & 1 deletion spec/atom-environment-spec.js
Expand Up @@ -375,7 +375,7 @@ describe('AtomEnvironment', () => {
it('opens an empty buffer', () => {
spyOn(atom.workspace, 'open')
atom.openInitialEmptyEditorIfNecessary()
expect(atom.workspace.open).toHaveBeenCalledWith(null)
expect(atom.workspace.open).toHaveBeenCalledWith(null, {pending: true})
})

it('does not open an empty buffer when a buffer is already open', async () => {
Expand Down
2 changes: 1 addition & 1 deletion src/atom-environment.js
Expand Up @@ -927,7 +927,7 @@ class AtomEnvironment {
if (!this.config.get('core.openEmptyEditorOnStart')) return
const {hasOpenFiles} = this.getLoadSettings()
if (!hasOpenFiles && this.workspace.getPaneItems().length === 0) {
return this.workspace.open(null)
return this.workspace.open(null, {pending: true})
}
}

Expand Down