From 879b115d651b26d3935f5c95d06f426019dedcd3 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 21 Feb 2021 10:12:10 +0530 Subject: remove all instances of view_month_offset --- src/app/impl_view.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/app/impl_view.rs') 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 { for habit in self.habits.iter_mut() { habit.inner_data_mut_ref().set_view_mode(ViewMode::Day); } + self.reset_cursor(); return EventResult::Consumed(None); } @@ -159,14 +160,12 @@ impl View for App { } /* Every keybind that is not caught by App trickles - * down to the focused habit. We sift back to today - * before performing any action, "refocusing" the cursor + * down to the focused habit. * */ _ => { if self.habits.is_empty() { return EventResult::Ignored; } - self.reset_cursor(); self.habits[self.focus].on_event(e) } } -- cgit v1.2.3