elig0n / Switcheroo

The humble incremental-search task switcher for Windows. With my own extensions
https://www.switcheroo.io
GNU General Public License v3.0
54 stars 10 forks source link

Fix ArgumentOutOfRangeException when there are less than 10 opened windows to highlight #26

Closed kubarom closed 3 years ago

kubarom commented 3 years ago

Hi,

ArgumentOutOfRangeException is thrown when there are less than 10 opened windows. Windows gives me an unhandled exception closing switcheroo immediately.

image

The suspected code is here, where the opened windows count is assumed to be at least 10.

https://github.com/elig0n/Switcheroo/blob/d21d477b1182feb0605fa5fc94e9e2c63f099dea/Switcheroo/MainWindow.xaml.cs#L431

I think it's supposed to look like that:

image

elig0n commented 3 years ago

Thank you