diff options
Diffstat (limited to 'src/app/impl_view.rs')
-rw-r--r-- | src/app/impl_view.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/app/impl_view.rs b/src/app/impl_view.rs index db05432..98f540c 100644 --- a/src/app/impl_view.rs +++ b/src/app/impl_view.rs | |||
@@ -134,6 +134,7 @@ impl View for App { | |||
134 | for habit in self.habits.iter_mut() { | 134 | for habit in self.habits.iter_mut() { |
135 | habit.inner_data_mut_ref().set_view_mode(ViewMode::Day); | 135 | habit.inner_data_mut_ref().set_view_mode(ViewMode::Day); |
136 | } | 136 | } |
137 | self.reset_cursor(); | ||
137 | return EventResult::Consumed(None); | 138 | return EventResult::Consumed(None); |
138 | } | 139 | } |
139 | 140 | ||
@@ -159,14 +160,12 @@ impl View for App { | |||
159 | } | 160 | } |
160 | 161 | ||
161 | /* Every keybind that is not caught by App trickles | 162 | /* Every keybind that is not caught by App trickles |
162 | * down to the focused habit. We sift back to today | 163 | * down to the focused habit. |
163 | * before performing any action, "refocusing" the cursor | ||
164 | * */ | 164 | * */ |
165 | _ => { | 165 | _ => { |
166 | if self.habits.is_empty() { | 166 | if self.habits.is_empty() { |
167 | return EventResult::Ignored; | 167 | return EventResult::Ignored; |
168 | } | 168 | } |
169 | self.reset_cursor(); | ||
170 | self.habits[self.focus].on_event(e) | 169 | self.habits[self.focus].on_event(e) |
171 | } | 170 | } |
172 | } | 171 | } |