Created attachment 169487 [details] duplicated several untilted SUMMARY I use Document view instead of tabs. In this case I opened one new document, typed something, didn't save and logged off the Plasma session. Next day logged in (Kate was restored with empty Untilted), and I logged off. I repeated this several times and in result I got 8 "Untilted" documents (check screenshot). Of course I lost all what I wrote in first one, because saving data in "Untilted" doesn't work since several months (issue reported). Shame. STEPS TO REPRODUCE 1. Turn on save session in Plasma 2. Start Kate 3. Hide tabs 4. Turn on Documents (left side) view 5. click New 6. Type something 7. Log off from Plasma session 8. Log on to Plasma session (Plasma restored recently opened apps. and in Kate we have empty Untilted - lost data) 9. Log off from Plasma session 10. Log on to Plasma session Repeat two last steps couple times 11. Try to close last Untilted document by hover mouse cursor on end of right side of highlighting entry (you will see red close button) OBSERVED RESULT Happens nothing - is not possible to close last document EXPECTED RESULT Should be possible to close last document SOFTWARE/OS VERSIONS Linux/KDE Plasma: Yes (available in About System) KDE Plasma Version: 6.0.80 KDE Frameworks Version: 6.3.0 Qt Version: 6.7.0 ADDITIONAL INFORMATION
Created attachment 170710 [details] the try of close last "Untilted" document
Ok, I can reproduce if I open x untitled, then open a second window and then try to close the one doc that is there the only tab.
(In reply to Christoph Cullmann from comment #2) > Ok, I can reproduce if I open x untitled, then open a second window and then > try to close the one doc that is there the only tab. I have only one window opened. I don't open second. Only I open another file in currently running (Kate). I noticed that this usually happens, after restore of KDE session with running Kate. I can call it as "failed", because no any previously opened files are opened and only appear "untilted" in amount n+1 comparing to original session (all empty, even if originally I had filled any with text. Fresh example. Today. after start of KDE session, I got only 2 "untilted". Please note that originally was opened only 1 "untilted" (filled with text) + 2 normal files. All happened 2 days ago. And these normal files disappeared from "my session". BTW. After such restore of KDE session with "failed" restore of Kate session, it also loses list of files in "recent" option.
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1580
Git commit e09a2a552bcd003f281492a2fb86e22145391da6 by Christoph Cullmann. Committed on 13/09/2024 at 16:57. Pushed by cullmann into branch 'release/24.08'. fix strange behavior on document close after restore aggregate all registered documents & views in view space (LRU ordered) we need even the documents without tabs to avoid that we later have issues with closing documents and not the right ones being used as replacement if you have a limit on tabs (cherry picked from commit edb586451852f92c96971a6c1928d69dfec05306) edb58645 fix strange behavior on document close after restore Co-authored-by: Christoph Cullmann <cullmann@kde.org> M +15 -0 apps/lib/katetabbar.cpp M +7 -0 apps/lib/katetabbar.h M +6 -10 apps/lib/kateviewspace.cpp https://invent.kde.org/utilities/kate/-/commit/e09a2a552bcd003f281492a2fb86e22145391da6