cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.85k stars 178 forks source link

Deleting all items causes unwrap panic #130

Closed hayd closed 3 years ago

hayd commented 3 years ago

This is an edge case from a new machine with no commands (!) yet run, but also reproducible if you F2 delete every command... upon pressing ctrl+R:

❱ thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidColumnType(0, Null)', /Users/me/.cargo/registry/src/github.com-1ecc6299db9ec823/rusqlite-0.15.0/src/row.rs:149:31

Once I run a command then ctrl+R runs without panic.

expectation: either errors with a message saying "no commands in history" or show the empty list.

cantino commented 3 years ago

Thanks!