aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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;
}