Skip to content

Commit

Permalink
Merge pull request atom#13760 from atom/wl-open-empty-editor-as-pending
Browse files Browse the repository at this point in the history
Open empty editor as a pending pane item
  • Loading branch information
rafeca authored Apr 29, 2019
2 parents 0219306 + dbb6c7b commit 7e4dfa9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spec/atom-environment-spec.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit 7e4dfa9

Please sign in to comment.