From 81c650c63e3fdbe535cd4a292a4afb07118e1241 Mon Sep 17 00:00:00 2001 From: markt Date: Thu, 3 Aug 2006 18:39:32 +0000 Subject: add support for negative arguments to :Tab --- ChangeLog | 3 +++ src/CurrentWindowCmd.cc | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 372f307..d9fb470 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,9 @@ (Format: Year/Month/Day) Changes for 1.0rc3: *06/08/03: + * Added support for negative arguments to the `Tab' key command to count + backwards from the last tab in the group (Mark) + CurrentWindowCmd.cc * Updated documentation (Mark) fluxbox.txt fluxstyle.txt *06/08/02: 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() { } void GoToTabCmd::real_execute() { - if (fbwindow().numClients() <= 1 || m_tab_num > fbwindow().numClients()) + int num = m_tab_num + (m_tab_num > 0 ? 0 : fbwindow().numClients() + 1); + if (num < 1 || num > fbwindow().numClients()) return; FluxboxWindow::ClientList::iterator it = fbwindow().clientList().begin(); - int num = m_tab_num; while (--num > 0) ++it; fbwindow().setCurrentClient(**it, true); -- cgit v0.11.2