aboutsummaryrefslogtreecommitdiff
path: root/src/command.rs
diff options
context:
space:
mode:
authoronielfa <[email protected]>2020-07-23 23:56:38 +0100
committeronielfa <[email protected]>2020-07-23 23:56:38 +0100
commit7e44bbff6d7f572f5f92b3a6b0f1d5e523379ba4 (patch)
treeb80e0883bbd1bd02fa11f790c80c471a77800602 /src/command.rs
parent242d58264df4842464e12c70297608bc0833d632 (diff)
parentd7c303dda4750a432478c94b3ed41bca1352d839 (diff)
Merge branch 'master' into feature/larger-names
Diffstat (limited to 'src/command.rs')
-rw-r--r--src/command.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/command.rs b/src/command.rs
index a893430..ae5be66 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;