SUMMARY If there are split views, the left (or top) view is focused, and I close a tab in the left(/top) view (either the active tab or another one), in some cases keyboard focus switches to the right(/bottom) side. I'm not sure under exactly what circumstances this happens, but it seems to happen when the file that's in the active tab on the left side the operation (i.e. tab that was switched to if the active tab was closed, or just the already active tab if an inactive tab was closed) happens to also be open on the right side. It doesn't seem to happen in the other direction, i.e. focus switching from the right to the left. Below I describe a series of steps that seem to reproduce the bug reliably. STEPS TO REPRODUCE 1. Start Kate with an empty session. 2. Open file A. 3. Click Split Vertical. Now file A is open on both sides, and the right side is focused. 4. Click in the editor on the left side to focus it. 5. Open file B. Now both A and B are open on the left side, with B being the active tab and has keyboard focus; A is open on the right side. 6. Close B by clicking on the X button in the tab. OBSERVED RESULT File A remains open on both sides, and the cursor is blinking in the right side view; it has keyboard focus. EXPECTED RESULT File A remains open on both sides, and the left side has keyboard focus. 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: tried both X11 and Wayland; it doesn't matter
May be related to Bug 465808; this one is about closing a tab in the view with keyboard focus, that one about closing a tab in the other view.
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1110
Git commit c3085d17a3f7aedb5e357fe12b4ad638acdbae20 by Waqar Ahmed. Committed on 17/02/2023 at 10:29. Pushed by cullmann into branch 'master'. Fix closing tab sometimes switches to next split FIXED-IN: 23.04 M +29 -0 apps/lib/autotests/kate_view_mgmt_tests.cpp M +1 -0 apps/lib/autotests/kate_view_mgmt_tests.h M +7 -1 apps/lib/kateviewmanager.cpp https://invent.kde.org/utilities/kate/commit/c3085d17a3f7aedb5e357fe12b4ad638acdbae20
Git commit 23dee614d7f7360aeb07feaae22e13973c33e2e3 by Waqar Ahmed. Committed on 28/02/2023 at 12:59. Pushed by waqar into branch 'release/22.12'. Fix closing tab sometimes switches to next split FIXED-IN: 23.04 (cherry picked from commit c3085d17a3f7aedb5e357fe12b4ad638acdbae20) M +29 -0 apps/lib/autotests/kate_view_mgmt_tests.cpp M +1 -0 apps/lib/autotests/kate_view_mgmt_tests.h M +7 -1 apps/lib/kateviewmanager.cpp https://invent.kde.org/utilities/kate/commit/23dee614d7f7360aeb07feaae22e13973c33e2e3