Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions pytermgui/window_manager/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,7 @@ def focus_next(self, step: int = 1) -> Window | None:
step: The direction to step through windows. +1 for next, -1 for previous.
"""

self._focus_index += step

if self._focus_index >= len(self._windows):
self._focus_index = 0
self._focus_index = (self._focus_index + step) % len(self._windows)

if self.focused is not None:
self.focused.blur()
Expand Down