Skip to content

Commit

Permalink
dont scroll too far on pageup/pagedown, margins for UI
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredolito committed Oct 14, 2024
1 parent 086653d commit 3008f42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cursive/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ fn up(ui: &mut Cursive) {
}

fn page_down(ui: &mut Cursive) {
let rows = screen_height(&ui);
let rows = screen_height(&ui) - 6;
ui.call_on_name("results", |l: &mut SelectView<pass::PasswordEntry>| {
l.select_down(rows);
});
Expand All @@ -119,7 +119,7 @@ fn page_down(ui: &mut Cursive) {
}

fn page_up(ui: &mut Cursive) {
let rows = screen_height(&ui);
let rows = screen_height(&ui) - 6;
ui.call_on_name("results", |l: &mut SelectView<pass::PasswordEntry>| {
l.select_up(rows);
});
Expand Down

0 comments on commit 3008f42

Please sign in to comment.