From 4abee96d2e8658c3227f50f9208f26c7a98926ab Mon Sep 17 00:00:00 2001 From: James Campos Date: Sun, 19 Apr 2020 09:21:36 -0700 Subject: bounds --- src/main.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3