jdx / demand

prompt library for rust
https://docs.rs/demand
MIT License
57 stars 4 forks source link

select might panic when filtering multi-page options #5

Closed roele closed 9 months ago

roele commented 9 months ago

When the select has more than 1 page, one can filter the options and still navigate to a page > 1 where an empty option can be selected which will result in following error.

The application panicked (crashed).
Message:  called `Option::unwrap()` on a `None` value
Location: ~/.local/share/mise/installs/rust/1.75.0/registry/src/index.crates.io-6f17d22bba15001f/demand-0.3.0/src/select.rs:126

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.