Bug 490638 - Random tab order when switching between tabs using Control-Tab and Control-Shift-Tab
Summary: Random tab order when switching between tabs using Control-Tab and Control-Sh...
Status: RESOLVED NOT A BUG
Alias: None
Product: konsole
Classification: Applications
Component: tabbar (show other bugs)
Version: 24.05.2
Platform: unspecified Linux
: NOR minor
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-22 07:25 UTC by Oskari Lahtinen
Modified: 2024-10-31 13:44 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oskari Lahtinen 2024-07-22 07:25:25 UTC
SUMMARY
When switching between tabs in Konsole using Control-Tab and Control-Shift-Tab, the cycling order is (usually) different from the actual tab order. 

STEPS TO REPRODUCE
1. Open Konsole
2. Open multiple tabs using Control-Shift-T
3. Optionally shuffle the (preferably middle, to better demonstrate the bug) tabs a bit, dragging them with mouse
4. Press Control-Tab a few times to cycle between tabs

OBSERVED RESULT
Konsole doesn't switch through the tabs in the order they are in the tab bar.

EXPECTED RESULT
Konsole should switch through the tabs in the order they are visually in the tab bar with Control-Tab.

SOFTWARE/OS VERSIONS
Konsole version: 24.05.2
Linux/KDE Plasma: Fedora Linux 40 KDE 
(available in About System)
KDE Plasma Version: 6.1.2
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
Comment 1 Tino Lorenz 2024-10-20 21:18:36 UTC
To clarify, is the order actually random, or is it in recently used order?
When you repeatedly hit Ctrl+Tab (releasing the Ctrl key inbetween), does it keep switching back and forth between the same 2 tabs?
Comment 2 Oskari Lahtinen 2024-10-29 10:51:04 UTC
(In reply to Tino Lorenz from comment #1)
> To clarify, is the order actually random, or is it in recently used order?
> When you repeatedly hit Ctrl+Tab (releasing the Ctrl key inbetween), does it
> keep switching back and forth between the same 2 tabs?

I'm not 100% sure but I tested a bit more on 24.08.2. When cycling through the tabs, the order stays constant even with releasing Ctrl between cycling. The tabs seem to go through the order the tabs go through, from newest to oldest. 

To illustrate, let's say I open four tabs, 1-2-3-4. After opening the tabs, I'm on tab number 4. When pressing C-tab, I get to tab 3, which is the second newest tab. Running commands on any tabs doesn't seem to affect the order. 

If I manually swap two tabs' places, let's say they're in order 1-3-2-4, the C-tab goes again from newest to oldest.
Comment 3 Tino Lorenz 2024-10-31 13:32:33 UTC
Great, that sounds like the same issue I was having that I (hopefully) fixed in https://invent.kde.org/utilities/konsole/-/merge_requests/1038.

Also, switching between recently used tabs with C-Tab is the expected behavior. If you just want to use tab order rather than recently used order, you have to change the C-Tab shortcut from "Last Used Tabs" to "Next Tab".
Comment 4 Oskari Lahtinen 2024-10-31 13:44:02 UTC
Thanks for the info, it seems I had missed the "Last Used Tabs" as default behaviour for C-tab. Therefore the issue I was describing is not a bug but intentional behaviour. Still, it's a different default behaviour from couple other programs like Firefox and Dolphin, as far as I see it.