This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
Allow existing windows to be used when running atom --wait - #16497
Merged
Merged
Conversation
maxbrunsfeld
force-pushed
the
mb-reuse-windows-with-wait-flag
branch
2 times, most recently
from
January 6, 2018 00:54
19f1ddc to
ecfe8aa
Compare
maxbrunsfeld
force-pushed
the
mb-reuse-windows-with-wait-flag
branch
from
January 6, 2018 01:50
e97289e to
6f50f32
Compare
jasonrudolph
added a commit
to jasonrudolph/dotfiles
that referenced
this pull request
Jan 8, 2018
Now that `atom --wait` is fast, I can use it for authoring Git commits! 😅 /xref 31c5797 /xref atom/atom#16497 /xref atom/atom#1433
1 task done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The
--waitflag allows Atom to block until you are finished editing a file. Unfortunately, the way it is currently implemented, it simply opens a new Atom window and blocks until that entire window is closed. This means that opening a file withatom --waitis currently much slower than withatom, because the latter command can reuse an existing Atom window.Solution
This PR changes the behavior of
atom --waitso that it doesn't necessarily open a new window. It now uses the same criteria for selecting a window that theatomcommand normally uses, and can be freely combined with any other flag. Examples:--wait --new-window- reproduce the old behavior of--wait--wait file1 file2add multiple files to the current window and block until they are all closed--wait --add some-folder- add a project folder to the current window and block until this project folder is removed--wait some-file some-folderNo matter how it is combined with other flags and arguments,
atom --waitwill block until all of the specified paths have been closed.Result
Once this change ships, you might consider putting this line to your
~/.bash_profile:Fixes #1433
Depends on #16500