add support for negative arguments to :Tab

This commit is contained in:
markt 2006-08-03 18:39:32 +00:00
parent fc40000211
commit 81c650c63e
2 changed files with 5 additions and 2 deletions

View file

@ -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:

View file

@ -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);