Repository navigation
Conversation
| else | ||
| null | ||
| # Represents an empty editor (no project folders) | ||
| "editor-<empty>" |
There was a problem hiding this comment.
Completely blanking on a good name here
|
/cc @as-cii @nathansobo |
|
How will this behave with multiple instances without a project folder? Will it restore all instances or will it restore just one instance with all the tabs from all the instances? |
|
@alexandernst Wouldn't having separate instances share the same serialization state? So if you edit some files without a project, then open a new Atom window, shouldn't those same files show up? (Also, this should adhere to the openEmptyEditorOnStartup option) |
|
@50Wliu No, not really. At least here, opening multiple instances opens completely separate windows that do not share any of the open files (neither existing nor unsaved buffers). |
|
I might be wrong, but isn't this return value used as the file name? < and > are not valid file name characters. Why don't you just return the sha for an empty string by removing the "if paths?.length > 0"? |
|
@leobasilio States got moved to IndexedDB. They are no longer in |
|
This is great! Looking forward to this getting rolled in but I will share that it does not quite work as expected right now if multiple windows are opened. e.g. Start Atom If you bail on Atom, anything in Window (2) is lost. Atom will restore two Windows but both will contain tabs from the first Window (1) in the above scenario. Continuing to edit in Window (2) will not get acknowledged in subsequent exits/restores. Additional weird behavior is if you create a new window, after serialization, the new document in the new window will contain the text from the previous window. All in all, this is a huge improvement to behavior in v1.6 — currently there is not even 'save' dialogs before exiting/dataloss. As long as there is one 'no project' window open, things should work as you'd think. |
Hmm.. I'm not sure how to solve what you're describing. This probably requires some more thought rather than a quick patch, as the solution to what you describe sounds involved. Perhaps each non-project window has some sort of unique identifier and we remember these identifiers. |
This allows for state to be saved without a project folder added.
Would fix #10474
I can add a spec for this if this something we want.