summaryrefslogtreecommitdiff
path: root/src/CurrentWindowCmd.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/CurrentWindowCmd.cc')
-rw-r--r--src/CurrentWindowCmd.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc
index dc27056..e4de9a4 100644
--- a/src/CurrentWindowCmd.cc
+++ b/src/CurrentWindowCmd.cc
@@ -85,12 +85,12 @@ void TakeToPrevWorkspaceCmd::real_execute() {
85} 85}
86 86
87void GoToTabCmd::real_execute() { 87void GoToTabCmd::real_execute() {
88 if (fbwindow().numClients() <= 1 || m_tab_num > fbwindow().numClients()) 88 int num = m_tab_num + (m_tab_num > 0 ? 0 : fbwindow().numClients() + 1);
89 if (num < 1 || num > fbwindow().numClients())
89 return; 90 return;
90 91
91 FluxboxWindow::ClientList::iterator it = fbwindow().clientList().begin(); 92 FluxboxWindow::ClientList::iterator it = fbwindow().clientList().begin();
92 93
93 int num = m_tab_num;
94 while (--num > 0) ++it; 94 while (--num > 0) ++it;
95 95
96 fbwindow().setCurrentClient(**it, true); 96 fbwindow().setCurrentClient(**it, true);