I think if ListState is hidden and input is down or up arrow, then the ListState is not updated, and try to acccess to already moved variable again.
However, I didn't see a problem with the current closure implementation, so I responded by adding a flag to not call the closure if ListState is not displayed.
Thank you in advance.
changelog: Adding is_empty flag for prevent panic.
close #142
offsetis_empty flag for preventing panic in a filter.This bug is caused by a moving ownership in a closure.
https://github.com/TaKO8Ki/gobang/blob/b13e4bb255ea533db16240e1cb5138fca4241264/src/components/completion.rs#L77-L83
I think if ListState is hidden and input is down or up arrow, then the ListState is not updated, and try to acccess to already moved variable again.
However, I didn't see a problem with the current closure implementation, so I responded by adding a flag to not call the closure if ListState is not displayed.
Thank you in advance.
changelog: Adding is_empty flag for prevent panic.