Bug 476565

Summary: Can't disable the popup menu when switching the tab list (Ctrl+Tab)
Product: [Applications] kate Reporter: moninah
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: chris-k, christoph
Priority: NOR    
Version First Reported In: 23.08.1   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshot from Kate
Screenshot from Notepad++

Description moninah 2023-11-05 02:04:58 UTC
Created attachment 162870 [details]
Screenshot from Kate

So that the switching is like in browsers. For example, Notepad++ has an option, but I can’t find a similar setting in Kate.

I removed the hotkeys from «Settings» → «Configure Keyboard Shortcuts» → «tabswitcher» → «Last Used Views» and set «Ctrl+Tab» and «Ctrl+Shift+Tab» to «Kate» → «Next Tab» and «Previous Tabю». But the only problem that remains is that when you press «Ctrl+Tab» on the last open tab, it does not jump to the first initial tab (you cannot press only «Ctrl+Tab» to switch to all tabs in a circle), you have to press «Ctrl+Shift+Tab» to return to previous tabs.
Comment 1 moninah 2023-11-05 02:05:40 UTC
Created attachment 162871 [details]
Screenshot from Notepad++
Comment 2 Christoph Cullmann 2023-11-11 19:26:31 UTC
Valid wish to have that, we would need to make


int KateTabBar::prevTab() const
{
    return currentIndex() == 0 ? 0 // first index, keep it here.
                               : currentIndex() - 1;
}

int KateTabBar::nextTab() const
{
    return currentIndex() == count() - 1 ? count() - 1 // last index, keep it here.
                                         : currentIndex() + 1;
}

configurable.
Comment 3 moninah 2023-11-16 16:29:19 UTC
Thanks. In which file should these changes be made?
Comment 4 Christoph Cullmann 2023-11-18 22:12:44 UTC
In kate.git, apps/lib/katetabbar.cpp
Comment 5 moninah 2023-11-23 04:04:42 UTC
So will you add it in future versions? Or do I need to make changes to the file myself? I can't find this file on my system using command: "find / -iname katetabbar.cpp".
Comment 6 Waqar Ahmed 2024-07-31 15:24:12 UTC
*** Bug 491069 has been marked as a duplicate of this bug. ***
Comment 7 Bug Janitor Service 2024-07-31 15:29:32 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1552
Comment 8 Waqar Ahmed 2024-07-31 21:01:05 UTC
Git commit c782e10fe0502a04ddd89b84f48b3fb5a8d67509 by Waqar Ahmed.
Committed on 31/07/2024 at 15:29.
Pushed by cullmann into branch 'master'.

Tabs: Wrap around to first on nextTab if current is last tab

... and vice versa

M  +2    -2    apps/lib/katetabbar.cpp

https://invent.kde.org/utilities/kate/-/commit/c782e10fe0502a04ddd89b84f48b3fb5a8d67509
Comment 9 Waqar Ahmed 2024-08-05 15:44:54 UTC
Git commit 835bb8a283c37a851868a352d5b1ced439c2a9eb by Waqar Ahmed.
Committed on 05/08/2024 at 15:44.
Pushed by waqar into branch 'release/24.08'.

Tabs: Wrap around to first on nextTab if current is last tab

... and vice versa
(cherry picked from commit c782e10fe0502a04ddd89b84f48b3fb5a8d67509)

M  +2    -2    apps/lib/katetabbar.cpp

https://invent.kde.org/utilities/kate/-/commit/835bb8a283c37a851868a352d5b1ced439c2a9eb