pytermgui icon indicating copy to clipboard operation
pytermgui copied to clipboard

[BUG] WindowManager focus_next() Reverse Wrapping

Open lfgberg opened this issue 6 months ago • 1 comments

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:

  1. Instantiate a WindowManager
  2. Use .focus_next(step=-1) multiple times
  3. Observe the crash.

Expected behavior The WM should wrap and have the bottom window focused instead of crashing.

Possible solution Opening a PR rn.

lfgberg avatar May 17 '25 21:05 lfgberg

See https://github.com/bczsalba/pytermgui/pull/162

lfgberg avatar May 17 '25 21:05 lfgberg