pytermgui
pytermgui copied to clipboard
[BUG] WindowManager focus_next() Reverse Wrapping
Describe the bug
When using focus_next() on a WindowManager with a negative step (ex. step=-1), a crash occurs instead of wrapping around to the next window as seen with a positive step
To Reproduce Steps to reproduce the behavior:
- Instantiate a WindowManager
- Use
.focus_next(step=-1)multiple times - Observe the crash.
Expected behavior The WM should wrap and have the bottom window focused instead of crashing.
Possible solution Opening a PR rn.
See https://github.com/bczsalba/pytermgui/pull/162