Merge pull request #13760 from atom/wl-open-empty-editor-as-pending

Open empty editor as a pending pane item
This commit is contained in:
Rafael Oleza 2019-04-29 15:54:25 +02:00 committed by GitHub
commit 7e4dfa9417
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -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 () => {

View File

@ -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})
}
}