diff options
Diffstat (limited to 'scripts/focus.py')
| -rw-r--r-- | scripts/focus.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/focus.py b/scripts/focus.py index 4c3e5a13..79da5a21 100644 --- a/scripts/focus.py +++ b/scripts/focus.py @@ -59,10 +59,11 @@ def focus_next(data, num=1, forward=1): for i in r: if found: target = i + found = 2 break elif screen.client(i).window() == client_win: found = 1 - if not found: # wraparound + if found == 1: # wraparound if forward: target = 0 else: target = count - 1 @@ -80,7 +81,7 @@ def focus_next(data, num=1, forward=1): t += num if t >= count: t -= count else: - t -= 1 + t -= num if t < 0: t += count if t == target: return # nothing to focus |
