SUMMARY The Ctrl+Tab tab switcher (aka Last Used Views) currently navigates through open files in reverse order of when they were last focused *across all split views*, not just the current one. It is also willing to create new tabs, as it allows switching to a file that's open in another split view, but not the currently focused one. In particular, closing a file with Ctrl+W, then pressing Ctrl+Tab, results in reopening the file just closed if it's open in another split. (However, files that have been closed in every view can't be switched to.) Instead, there should be separate Ctrl+Tab orders for each split view. Each one should only contain the files that are open in that view, in reverse order of when they were last active in that view. STEPS TO REPRODUCE Many ways. For example: 1. Start Kate with a new session. 2. Open File A. 3. Click Split Vertical. 4. Open File B on the right side. 5. Click on the left side, then open File C there. 6. Click on the right side to focus it. 7. Press Ctrl+Tab. OBSERVED RESULT If you hold Ctrl, the files are listed in the order B, C, A, with C selected. When you release the Ctrl, File C is opened on the right side, becoming the active tab. EXPECTED RESULT If you hold Ctrl, the files are listed in the order B, A, with A selected. When you release the Ctrl, File B becomes the active tab on the right side. SOFTWARE/OS VERSIONS Operating System: openSUSE Tumbleweed 20230214 KDE Plasma Version: 5.27.0 KDE Frameworks Version: 5.103.0 Qt Version: 5.15.8 Graphics Platform: X11 ADDITIONAL INFORMATION I'm not entirely sure if this should be filed as a bug or a wish, but the current behavior is weird, unusual, and in particular the fact that an Alt+Tab-style switcher can (re)open a new tab definitely feels like a bug. IIRC the current behavior started with one of last year's major releases, IIRC the one that made it so that closing a tab in one split view doesn't close the file in other split view(s) where it's open.
> EXPECTED RESULT > If you hold Ctrl, the files are listed in the order B, A, with A selected. > When you release the Ctrl, File B becomes the active tab on the right side. Sorry, I meant that File A should become active on the right side. And only B and A should be listed.
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1113
We have decided to keep the behaviour for now. See linked MR: https://invent.kde.org/utilities/kate/-/merge_requests/1113
(In reply to Waqar Ahmed from comment #3) > We have decided to keep the behaviour for now. See linked MR: > https://invent.kde.org/utilities/kate/-/merge_requests/1113 Regarding the comments there (not sure if I should respond here or there): I didn't propose changing the Documents sidebar at all (I like its current behavior of opening any file you click in the focused split), only the Ctrl+Tab behavior. VSCode has tabs, and Ctrl+Tab works like I proposed (separate orders, and only showing the tabs in the current split view). Qt Creator doesn't have a concept of which files are open in a given split view, but the Ctrl+Tab order is per-split there too. Visiting a file in one split doesn't bring it forward in the Ctrl+Tab order of another split. KDevelop, OTOH, works like Kate currently; there, the equivalent of my proposal is a confirmed request since 2013: Bug 323218. Eclipse seems to behave rather differently, such that views can be arranged in many ways, and it seems to have a single Ctrl+Tab order, but it will switch to a different (split) view if necessary, rather than open a file in the current view. In LyX (not a plain text editor, but also has tabs and splits), Ctrl+Tab switches in the order tabs are on the tab bar, per-split, rather than in the order they have been last used. (Kate has different shortcuts for this by default.) However, I was wrong that the current Kate Ctrl+Tab behavior started last year: I built 21.12 and it also worked like this. I guess I thought it started with 22.04 because the most noticeable effect—Ctrl+Tab reopening a tab I just closed with Ctrl+W—didn't happen until then because closing a tab closed it everywhere.