summaryrefslogtreecommitdiffstats
path: root/pkg/gui/context/view_trait.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-06-13 11:01:26 +1000
committerJesse Duffield <jessedduffield@gmail.com>2022-08-06 13:49:11 +1000
commit524bf83a4a681408c3fb57818f6968cab632e0ae (patch)
tree8858b4ee8d4670dcdd1637fe5fedf00ff080c154 /pkg/gui/context/view_trait.go
parent6dfef08efc5c7f262194c0af35fd777428f33a1a (diff)
refactor to only have one context per view
Diffstat (limited to 'pkg/gui/context/view_trait.go')
-rw-r--r--pkg/gui/context/view_trait.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/gui/context/view_trait.go b/pkg/gui/context/view_trait.go
index 8f2a2e99e..bf8a49e43 100644
--- a/pkg/gui/context/view_trait.go
+++ b/pkg/gui/context/view_trait.go
@@ -61,12 +61,12 @@ func (self *ViewTrait) horizontalScrollAmount() int {
return self.view.InnerWidth() / HORIZONTAL_SCROLL_FACTOR
}
-func (self *ViewTrait) ScrollUp() {
- self.view.ScrollUp(1)
+func (self *ViewTrait) ScrollUp(value int) {
+ self.view.ScrollUp(value)
}
-func (self *ViewTrait) ScrollDown() {
- self.view.ScrollDown(1)
+func (self *ViewTrait) ScrollDown(value int) {
+ self.view.ScrollDown(value)
}
// this returns the amount we'll scroll if we want to scroll by a page.