diff options
Diffstat (limited to 'src/command.rs')
-rw-r--r-- | src/command.rs | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/command.rs b/src/command.rs index e4c099e..4f3e491 100644 --- a/src/command.rs +++ b/src/command.rs | |||
@@ -29,7 +29,6 @@ fn get_command_completion(prefix: &str) -> Option<String> { | |||
29 | 29 | ||
30 | fn get_habit_completion(prefix: &str, habit_names: &[String]) -> Option<String> { | 30 | fn get_habit_completion(prefix: &str, habit_names: &[String]) -> Option<String> { |
31 | let first_match = habit_names.iter().filter(|&x| x.starts_with(prefix)).next(); | 31 | let first_match = habit_names.iter().filter(|&x| x.starts_with(prefix)).next(); |
32 | eprintln!("{:?}| {:?}", prefix, first_match); | ||
33 | return first_match.map(|x| x.into()); | 32 | return first_match.map(|x| x.into()); |
34 | } | 33 | } |
35 | 34 | ||
@@ -60,7 +59,6 @@ pub fn open_command_window(s: &mut Cursive) { | |||
60 | } else { | 59 | } else { |
61 | let word = contents.split(' ').last().unwrap(); | 60 | let word = contents.split(' ').last().unwrap(); |
62 | let completion = get_habit_completion(word, &habit_list); | 61 | let completion = get_habit_completion(word, &habit_list); |
63 | eprintln!("{:?} | {:?}", completion, contents); | ||
64 | if let Some(c) = completion { | 62 | if let Some(c) = completion { |
65 | let cb = view.set_content(format!("{}", contents) + &c[word.len()..]); | 63 | let cb = view.set_content(format!("{}", contents) + &c[word.len()..]); |
66 | return Some(EventResult::Consumed(Some(cb))); | 64 | return Some(EventResult::Consumed(Some(cb))); |