https://bugs.kde.org/show_bug.cgi?id=486967
Bug ID: 486967 Summary: Remember order of closed document tabs/views Classification: Applications Product: kdevelop Version: unspecified Platform: unspecified OS: Unspecified Status: REPORTED Severity: wishlist Priority: NOR Component: UI: general Assignee: kdevelop-bugs-n...@kde.org Reporter: jarmo.tii...@gmail.com Target Milestone: --- I asked in https://invent.kde.org/kdevelop/kdevelop/-/merge_requests/559#note_940928 an question that inspired me to put up this feature request. I mostly just want to remember this idea, so that I or somebody else could perhaps try implement this some day. Looking at my `sessionrc` I see that an `[Working File Sets][code_9925939][View 0 Config]` doesn't store any information about of its order, at least explicitly. The `[Working File Sets][code_9925939]` list of view's seems to be sorted in lexical order: ``` View 0=file:///mnt/source/kde/src/kdevelop/kdevplatform/debugger/breakpoint/breakpointmodel.h View 1=file:///mnt/source/kde/src/kdevelop/kdevplatform/debugger/breakpoint/breakpointmodel.cpp View 10=file:///mnt/source/kde/src/kdevelop/kdevplatform/sublime/tooldocument.cpp View 11=file:///mnt/source/kde/src/kdevelop/kdevplatform/sublime/idealbuttonbarwidget.cpp ``` So I'm assuming once a document tab/view is closed, it's removed from these structures, and therefore, I think KDevelop is unable to remember the tab/view ordering of any closed documents. Reordering of the document tabs while they remain open works fine, and this order is persistent. However, KDevelop seems to forget this ordering as soon as the document tab/view is closed. The default re-opened position of a tab/view thus feels wrong most of the time, and the available configuration settings don't help much. So my proposed idea would be to save an ordering hints per URL, to enable `openDocument()` to restore an opened document tab/view at its former position, or at least nearish to it. This would take preference over the current configuration settings "Open new tab after current" and "Arrange related document side by side" when the ordering hint is available. * Option in the configuration UI: "Remember closed tab order" opt-in. * Closing a document would save/update its tab/view order as an hint for the next time this URL is opened. * If the URL's file on disk ceases to exist, the kdevelop could then clean up any tab/view order hints of such URLs. (to not bloat the config indefinitely) Or alternatively, remember only last N closed tab/view positions. -- You are receiving this mail because: You are watching all bug changes.