aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock2
-rw-r--r--Cargo.toml2
-rw-r--r--src/command.rs3
3 files changed, 3 insertions, 4 deletions
diff --git a/Cargo.lock b/Cargo.lock
index c4f9734..0488f71 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -295,7 +295,7 @@ dependencies = [
295 295
296[[package]] 296[[package]]
297name = "dijo" 297name = "dijo"
298version = "0.2.0" 298version = "0.2.1"
299dependencies = [ 299dependencies = [
300 "chrono", 300 "chrono",
301 "clap", 301 "clap",
diff --git a/Cargo.toml b/Cargo.toml
index a0872ce..f4a31c9 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
1[package] 1[package]
2name = "dijo" 2name = "dijo"
3version = "0.2.0" 3version = "0.2.1"
4authors = ["Akshay <[email protected]>"] 4authors = ["Akshay <[email protected]>"]
5edition = "2018" 5edition = "2018"
6description = "Scriptable, curses-based, digital habit tracker" 6description = "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;