aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.rs')
-rw-r--r--src/window.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/window.rs b/src/window.rs
index 68fc258..3714c4c 100644
--- a/src/window.rs
+++ b/src/window.rs
@@ -57,9 +57,10 @@ impl Window {
Ok(())
}
- pub fn scroll_down(&mut self) {
- //TODO check if we're at bottom
- self.scroll += 1;
+ pub fn scroll_down(&mut self, until: usize) {
+ if self.scroll < until - 1 {
+ self.scroll += 1;
+ }
}
pub fn scroll_up(&mut self) {