aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Campos <james.r.campos@gmail.com>2020-04-19 09:21:36 -0700
committerJames Campos <james.r.campos@gmail.com>2020-04-19 09:21:36 -0700
commit4abee96d2e8658c3227f50f9208f26c7a98926ab (patch)
tree8fcb6fafef8dbac92bb47852392520464f91421a /src
parent4c47c95d8823ae04197f5c3d036180cee9a962d5 (diff)
downloadbk-4abee96d2e8658c3227f50f9208f26c7a98926ab.tar.gz
bounds
Diffstat (limited to 'src')
-rw-r--r--src/main.rs8
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;
}