diff options
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/impl_self.rs | 1 | ||||
-rw-r--r-- | src/app/impl_view.rs | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/app/impl_self.rs b/src/app/impl_self.rs index 325c53f..c2a24cf 100644 --- a/src/app/impl_self.rs +++ b/src/app/impl_self.rs | |||
@@ -24,7 +24,6 @@ impl App { | |||
24 | let (tx, rx) = channel(); | 24 | let (tx, rx) = channel(); |
25 | let mut watcher = watcher(tx, Duration::from_secs(1)).unwrap(); | 25 | let mut watcher = watcher(tx, Duration::from_secs(1)).unwrap(); |
26 | watcher.watch(utils::auto_habit_file(), RecursiveMode::Recursive); | 26 | watcher.watch(utils::auto_habit_file(), RecursiveMode::Recursive); |
27 | |||
28 | return App { | 27 | return App { |
29 | habits: vec![], | 28 | habits: vec![], |
30 | focus: 0, | 29 | focus: 0, |
diff --git a/src/app/impl_view.rs b/src/app/impl_view.rs index b735003..1261208 100644 --- a/src/app/impl_view.rs +++ b/src/app/impl_view.rs | |||
@@ -85,6 +85,7 @@ impl View for App { | |||
85 | if self.habits.is_empty() { | 85 | if self.habits.is_empty() { |
86 | return EventResult::Ignored; | 86 | return EventResult::Ignored; |
87 | } | 87 | } |
88 | let m = self.message.clone(); | ||
88 | match e { | 89 | match e { |
89 | Event::Key(Key::Right) | Event::Key(Key::Tab) | Event::Char('l') => { | 90 | Event::Key(Key::Right) | Event::Key(Key::Tab) | Event::Char('l') => { |
90 | self.set_focus(Absolute::Right); | 91 | self.set_focus(Absolute::Right); |
@@ -166,7 +167,7 @@ impl View for App { | |||
166 | return EventResult::Consumed(None); | 167 | return EventResult::Consumed(None); |
167 | } | 168 | } |
168 | Event::CtrlChar('c') => { | 169 | Event::CtrlChar('c') => { |
169 | self.message.write().unwrap().set_message("Use the :q command to quit"); | 170 | m.write().unwrap().set_message("Use the :q command to quit"); |
170 | return EventResult::Consumed(None); | 171 | return EventResult::Consumed(None); |
171 | } | 172 | } |
172 | 173 | ||