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 681f714efec13f7a52855f9aebe180f5360cf654..2e74d44b03fd908b14e3041f46f920a12d2054c5 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