Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Windows with files open but no open project not restored with "Restore previous window on start" #1129

Open
1 task done
terencehill opened this issue May 31, 2019 · 5 comments

Comments

@terencehill
Copy link

Edit by @rsese to use issue template

Prerequisites

Description

The description for the yes setting of Settings > Core > Restore Previous Windows On Start should be updated now that you can open single files with no project path (x-ref: atom/atom#18608). Need to mention that it only applies if you have a project open and doesn't apply if you opened an Atom window in single-file mode.

Steps to Reproduce

  1. Set Settings > Core > Restore Previous Windows On Start to yes (note description that says "When selected 'yes' and Atom is started from the icon or atom by itself from the command line, restores the last state of all Atom windows; otherwise a blank environment is loaded."
  2. Quit Atom.
  3. Start Atom by opening some single file atom project/file.txt
  4. Quit Atom.
  5. Start Atom with atom

Expected behavior: [What you expect to happen]

Based on the setting description, expect a window to open with the file opened in step (3).

Actual behavior: [What actually happens]

A blank window opens.

Reproduces how often: [What percentage of the time does it reproduce?]

100%

Versions

macOS 10.12.6

$ atom-nightly -v
Atom    : 1.39.0-nightly19
Electron: 3.1.10
Chrome  : 66.0.3359.181
Node    : 10.2.0

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.


As a new user of Atom (v1.37.0, Windows 10), I struggled for hours trying to understand why the heck the option "Restore previous window on start" wasn't working. I was about to trash the whole application for this reason (I'm happy with jEdit anyway) when by chance I've found out that I needed to add a project folder in the tree view to make it work, see #19343.

If there is no easy way to make it work without adding any project, can it at least be documented under "Restore previous window on start" that it works only if you add a project folder?

@rsese
Copy link

rsese commented Jun 3, 2019

Thanks for opening a separate issue for this @terencehill - for future issues, please use the issue template as mentioned below, otherwise your issue may be closed until the template is used.

I went ahead and filled out the issue template in this case, let me know if you had other specifics in mind or if I misunderstood (using the template would have provided more context that helps us understand exactly what you're describing).


We require the template to be filled out on all new issues and pull requests. We do this so that we can be certain we have all the information we need to address your submission efficiently. This allows the maintainers to spend more time fixing bugs, implementing enhancements, and reviewing and merging pull requests.

Thanks for understanding and meeting us half way 😀

@rafeca
Copy link
Contributor

rafeca commented Jun 18, 2019

I've sent a PR with a potential fix for the root cause of this issue: atom/atom#19557

I think we should treat the behaviour as a bug and attempt to fix it instead of documenting the wrong behaviour on the settings. What do you think @rsese ?

@rsese
Copy link

rsese commented Jun 18, 2019

I think we should treat the behaviour as a bug and attempt to fix it instead of documenting the wrong behaviour on the settings. What do you think @rsese ?

Ahh yeah, didn't even consider that - I think my initial thought was that opening a single file is handled as a special case so it was ok for its behavior with this setting to kinda be a special case too. But considering it a bug instead makes sense to me, it does seem like that setting should be respected as described no matter how you start Atom.

@rsese rsese changed the title Document under "Restore previous window on start" that it works only if you add a project folder Windows with files open but no open project not restored with "Restore previous window on start" Jun 18, 2019
@ghost
Copy link

ghost commented Jul 7, 2019

FYI: This also does not work under Win 10, 64b.
Edit: The solution mentioned by @terencehill works, though.

@SHuang-Broad
Copy link

Hi, any update on this? I am still quite confused on how to get atom just to restore the files I was reading, while I don't have a project for them. Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants