mirror of
https://github.com/denisidoro/navi.git
synced 2026-07-31 22:14:50 +00:00
Merge pull request #236 from austinjones/fix-badcmd
Fix crash when user enters a command that doesn't match any cheats
This commit is contained in:
commit
8d0c82c8a2
3 changed files with 7 additions and 4 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -89,7 +89,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
|
||||
[[package]]
|
||||
name = "navi"
|
||||
version = "2.0.6"
|
||||
version = "2.0.7"
|
||||
dependencies = [
|
||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"raw_tty 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "navi"
|
||||
version = "2.0.6"
|
||||
version = "2.0.7"
|
||||
authors = ["Denis Isidoro <denis_isidoro@live.com>"]
|
||||
edition = "2018"
|
||||
|
||||
|
|
|
|||
|
|
@ -42,13 +42,16 @@ fn extract_from_selections(raw_output: &str, contains_key: bool) -> (&str, &str,
|
|||
} else {
|
||||
"enter"
|
||||
};
|
||||
|
||||
let mut parts = lines.next().unwrap().split(display::DELIMITER);
|
||||
parts.next();
|
||||
parts.next();
|
||||
parts.next();
|
||||
let tags = parts.next().unwrap();
|
||||
|
||||
let tags = parts.next().unwrap_or("");
|
||||
parts.next();
|
||||
let snippet = parts.next().unwrap();
|
||||
|
||||
let snippet = parts.next().unwrap_or("");
|
||||
(key, tags, snippet)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue