Skip to content

Commit

Permalink
reset the scroll position when changing pages
Browse files Browse the repository at this point in the history
  • Loading branch information
pythops committed Feb 13, 2024
1 parent 07f3f60 commit 7d66d82
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ pub async fn handle_key_events(
sender.send(Event::Notification(notif)).unwrap();
app.page = app.page.saturating_sub(1);
}
app.cursor = 0;
}

KeyCode::Char('p') => {
Expand All @@ -59,6 +60,7 @@ pub async fn handle_key_events(
sender.send(Event::Notification(notif)).unwrap();
app.page = app.page.saturating_add(1);
}
app.cursor = 0;
}
}

Expand Down

0 comments on commit 7d66d82

Please sign in to comment.