diff options
-rw-r--r-- | Cargo.lock | 2 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/command.rs | 3 |
3 files changed, 3 insertions, 4 deletions
@@ -295,7 +295,7 @@ dependencies = [ | |||
295 | 295 | ||
296 | [[package]] | 296 | [[package]] |
297 | name = "dijo" | 297 | name = "dijo" |
298 | version = "0.2.0" | 298 | version = "0.2.1" |
299 | dependencies = [ | 299 | dependencies = [ |
300 | "chrono", | 300 | "chrono", |
301 | "clap", | 301 | "clap", |
@@ -1,6 +1,6 @@ | |||
1 | [package] | 1 | [package] |
2 | name = "dijo" | 2 | name = "dijo" |
3 | version = "0.2.0" | 3 | version = "0.2.1" |
4 | authors = ["Akshay <[email protected]>"] | 4 | authors = ["Akshay <[email protected]>"] |
5 | edition = "2018" | 5 | edition = "2018" |
6 | description = "Scriptable, curses-based, digital habit tracker" | 6 | description = "Scriptable, curses-based, digital habit tracker" |
diff --git a/src/command.rs b/src/command.rs index 38d48e9..0372065 100644 --- a/src/command.rs +++ b/src/command.rs | |||
@@ -61,8 +61,7 @@ pub fn open_command_window(s: &mut Cursive) { | |||
61 | let completion = get_habit_completion(word, &habit_list); | 61 | let completion = get_habit_completion(word, &habit_list); |
62 | eprintln!("{:?} | {:?}", completion, contents); | 62 | eprintln!("{:?} | {:?}", completion, contents); |
63 | if let Some(c) = completion { | 63 | if let Some(c) = completion { |
64 | let cb = | 64 | let cb = view.set_content(format!("{}", contents) + &c[word.len()..]); |
65 | view.set_content(format!("{}", contents) + c.strip_prefix(word).unwrap()); | ||
66 | return Some(EventResult::Consumed(Some(cb))); | 65 | return Some(EventResult::Consumed(Some(cb))); |
67 | }; | 66 | }; |
68 | return None; | 67 | return None; |