Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:epopov:branches:openSUSE:Factory
kate
2003-tab-switching.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2003-tab-switching.patch of Package kate
diff --git a/apps/lib/katetabbar.cpp b/apps/lib/katetabbar.cpp index 09ee59698d4283e658b834e568040e4eaf1d3e2c..c9bfb0892f25fc50c33fa6c7c701df17c7e5ffa7 100644 --- a/apps/lib/katetabbar.cpp +++ b/apps/lib/katetabbar.cpp @@ -127,14 +127,20 @@ bool KateTabBar::isActive() const int KateTabBar::prevTab() const { - return currentIndex() == 0 ? 0 // first index, keep it here. - : currentIndex() - 1; + if (count() < 2) { + return currentIndex(); + } + + return currentIndex() == 0 ? count() - 1 : currentIndex() - 1; } int KateTabBar::nextTab() const { - return currentIndex() == count() - 1 ? count() - 1 // last index, keep it here. - : currentIndex() + 1; + if (count() < 2) { + return currentIndex(); + } + + return currentIndex() == count() - 1 ? 0 : currentIndex() + 1; } bool KateTabBar::containsTab(int index) const
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor