aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Campos <james.r.campos@gmail.com>2020-07-29 13:12:12 -0700
committerJames Campos <james.r.campos@gmail.com>2020-07-29 13:12:12 -0700
commite933b8483e7c2ecbd834a43834d68e4af07291e2 (patch)
treec33709e078ea01cb189756b45952ce22849a2ee3 /src
parent6b618c60009b421d6a5b26cdc15f51ef7cb43209 (diff)
downloadbk-e933b8483e7c2ecbd834a43834d68e4af07291e2.tar.gz
fix first chapter scroll loop
Diffstat (limited to 'src')
-rw-r--r--src/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 141e353..fc761fb 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -650,7 +650,7 @@ impl Bk<'_> {
fn scroll_up(&mut self, n: usize) {
if self.line > 0 {
self.line = self.line.saturating_sub(n);
- } else {
+ } else if self.chapter > 0 {
self.prev_chapter();
self.line = self.chap().lines.len().saturating_sub(self.rows);
}