aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormarkt <markt>2006-08-03 18:39:32 (GMT)
committermarkt <markt>2006-08-03 18:39:32 (GMT)
commit81c650c63e3fdbe535cd4a292a4afb07118e1241 (patch)
tree699ee6ff1377ce00c3c7c8daf7ba34d9d0948bc7 /src
parentfc400002115a0f08b9dedd35effc53080850b0e2 (diff)
downloadfluxbox-81c650c63e3fdbe535cd4a292a4afb07118e1241.zip
fluxbox-81c650c63e3fdbe535cd4a292a4afb07118e1241.tar.bz2
add support for negative arguments to :Tab
Diffstat (limited to 'src')
-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);