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 --- src/command.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/command.rs') 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