Created attachment 155535 [details] screenshot of error popup referenced in step 5 SUMMARY If I have unsaved files opened, and I close the Kate window, it will pop up errors (one for every such file) indicating that it was not able to save it. This happens if the `kate` directory in the user appdata/roaming directory (usually at `c:\Users\<username>\AppData\Roaming\`) does not yet exist. STEPS TO REPRODUCE 1. Make sure that the above mentioned directory does not exist 2. Open Kate 3. Save the session with "Sessions > Save Session" on the toolbar 3. Open one or more files, write something into them, but do not save them 4. Close Kate 5. Observe error popups 6. Open Kate and choose to load the saved session 7. Observe empty unsaved files OBSERVED RESULT Saving the session does not persist unsaved files EXPECTED RESULT Saving the session persists unsaved files, which are restored along with their content when reopening the session SOFTWARE/OS VERSIONS Windows: 10 KDE Frameworks Version: 5.102.0 Qt Version: 5.15.8 ADDITIONAL INFORMATION Manually creating the folder at `c:\Users\<username>\AppData\Roaming\kate` fixes session restore for Kate 22.08.1, but not for 22.12.1. On 22.12.1, the error popup does not return, and the unsaved documents are still persisted, but seemingly a new bug is present: on opening Kate and loading the session, the files are not accessible in Kate. Despite that, when loading the session, the files disappear from the `c:\Users\<username>\AppData\Roaming\kate\stash\<session name>\` directory, and reapper when Kate is closed. I don't have access to releases between these 2 versions.
The files will be accessible via the "Documents" pane on the left. If there is no documents pane, make sure the "documents tree view" plugin is enabled
Oh, I see, thanks. I have found the files there. The documents pane button was not visible at first, but I could make it visible using the Show Active Document option in the Go menu at the top. Probably I had hidden the sidebar and forgot about it.
Git commit bb268e2be0ff118c277d2e5bffb98b6e00ece3ea by Christoph Cullmann. Committed on 10/09/2024 at 09:03. Pushed by cullmann into branch 'master'. fix session restore of tabs/views of untitled documents will allow us to restore the right tabs even for untitled documents and avoids that we create new untitled documents on session restore Related: bug 462112, bug 462523, bug 468573 M +22 -1 apps/lib/katedocmanager.cpp M +9 -0 apps/lib/katedocmanager.h M +37 -16 apps/lib/kateviewspace.cpp https://invent.kde.org/utilities/kate/-/commit/bb268e2be0ff118c277d2e5bffb98b6e00ece3ea
Git commit be856dbb927f2c4082218bc4e0360eb677c9c44f by Christoph Cullmann. Committed on 13/09/2024 at 16:56. Pushed by cullmann into branch 'release/24.08'. fix session restore of tabs/views of untitled documents will allow us to restore the right tabs even for untitled documents and avoids that we create new untitled documents on session restore Related: bug 462112, bug 462523, bug 468573 (cherry picked from commit bb268e2be0ff118c277d2e5bffb98b6e00ece3ea) 1866ba36 store the id from the session we did load/save 06c49bc4 write out the id of the document and not the url 2da4f29e read both the new session stored with id and the old with url Co-authored-by: Christoph Cullmann <christoph@cullmann.io> M +22 -1 apps/lib/katedocmanager.cpp M +9 -0 apps/lib/katedocmanager.h M +37 -16 apps/lib/kateviewspace.cpp https://invent.kde.org/utilities/kate/-/commit/be856dbb927f2c4082218bc4e0360eb677c9c44f
Thanks! I'll try to test it when I can obtain a windows build from the CI.