From 2f47f50b0382491099391185c6a2702b1370b206 Mon Sep 17 00:00:00 2001 From: Akshay Date: Thu, 23 Jul 2020 22:39:28 +0530 Subject: remove dependency on rustc v1.45, bump to v0.2.1 --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/command.rs | 3 +-- 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 = [ [[package]] name = "dijo" -version = "0.2.0" +version = "0.2.1" dependencies = [ "chrono", "clap", diff --git a/Cargo.toml b/Cargo.toml index a0872ce..f4a31c9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dijo" -version = "0.2.0" +version = "0.2.1" authors = ["Akshay "] edition = "2018" 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) { let completion = get_habit_completion(word, &habit_list); eprintln!("{:?} | {:?}", completion, contents); if let Some(c) = completion { - let cb = - view.set_content(format!("{}", contents) + c.strip_prefix(word).unwrap()); + let cb = view.set_content(format!("{}", contents) + &c[word.len()..]); return Some(EventResult::Consumed(Some(cb))); }; return None; -- cgit v1.2.3