diff options
author | James Campos <james.r.campos@gmail.com> | 2020-04-19 09:21:36 -0700 |
---|---|---|
committer | James Campos <james.r.campos@gmail.com> | 2020-04-19 09:21:36 -0700 |
commit | 4abee96d2e8658c3227f50f9208f26c7a98926ab (patch) | |
tree | 8fcb6fafef8dbac92bb47852392520464f91421a | |
parent | 4c47c95d8823ae04197f5c3d036180cee9a962d5 (diff) | |
download | bk-4abee96d2e8658c3227f50f9208f26c7a98926ab.tar.gz |
bounds
-rw-r--r-- | src/main.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index fabdafe..58b45ec 100644 --- a/src/main.rs +++ b/src/main.rs @@ -165,9 +165,11 @@ impl Bk { | KeyCode::Left | KeyCode::Up | KeyCode::PageUp => { - if self.pos == 0 && self.chapter_idx > 0 { - self.chapter_idx -= 1; - self.load_chapter(); + if self.pos == 0 { + if self.chapter_idx > 0 { + self.chapter_idx -= 1; + self.load_chapter(); + } } else { self.pos -= self.rows; } |