aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/command.rs3
1 files changed, 1 insertions, 2 deletions
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;