diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-23 09:03:06 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-23 09:03:06 +0000 |
| commit | 18ab2453077197a789448ce692c7e21436cca34b (patch) | |
| tree | 451cd9030dbe82a774518f32e9d47865a24cb470 /scripts/focus.py | |
| parent | 707f70682abe0dfaadbf76843a0dccb33f0eaeda (diff) | |
cycling by any number of windows
Diffstat (limited to 'scripts/focus.py')
| -rw-r--r-- | scripts/focus.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/focus.py b/scripts/focus.py index 084faeba..c0d60b1e 100644 --- a/scripts/focus.py +++ b/scripts/focus.py @@ -71,11 +71,11 @@ def focus_next(data, num=1, forward=1): screen.raiseWindow(client) return if forward: - t += 1 - if t == count: t = 0 + t += num + if t >= count: t -= count else: t -= 1 - if t < 0: t = count - 1 + if t < 0: t += count if t == target: return # nothing to focus def focus_prev(data, num=1): |
