Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix application:new-file command #18714

merged 1 commit into from Jan 17, 2019


None yet
1 participant
Copy link

smashwilson commented Jan 17, 2019

Requirements for Contributing a Bug Fix

Identify the Bug

Invoking the application:new-file command has no effect.

Description of the Change

In #18608, I reworked a bunch of the logic used by AtomApplication::openLocations() to interpret its locationsToOpen argument. This method is responsible for dividing them up into files to open in TextEditors and directories to add as project folders. In the process, I caused a regression in that any locationsToOpen elements with a null or undefined pathToOpen member would be ignored - but this is how the application:new-file command's handlers trigger the opening of an untitled TextEditor. I've restored the previous behavior by passing locationsToOpen elements with falsy pathToOpen members as "file" locations.

Alternate Designs

I thought about making the "empty TextEditor" case more explicit, but that's riskier and would take longer.

Possible Drawbacks


Verification Process

Open Atom in dev mode and press Cmd-N.

Release Notes


@smashwilson smashwilson added the bug label Jan 17, 2019

@smashwilson smashwilson merged commit 0360d26 into master Jan 17, 2019

3 checks passed

Atom Pull Requests #20190117.2 succeeded
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

@smashwilson smashwilson deleted the aw/new-file branch Jan 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.