summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-02-13 22:54:57 -0600
committerJeff Carr <[email protected]>2025-02-13 22:54:57 -0600
commit3ca1fff7554f9dc19c0dd2523e034cc93cc4f91c (patch)
tree0ee5a345ad35c0395fcdc35e9fd861897007c0f7
parent5a9f3565aaf596cf3ed399241df897dbe07042eb (diff)
mouse scroll in stdoutv0.22.23v0.22.22
-rw-r--r--eventBindings.go14
1 files changed, 12 insertions, 2 deletions
diff --git a/eventBindings.go b/eventBindings.go
index 02f33a6..05d1442 100644
--- a/eventBindings.go
+++ b/eventBindings.go
@@ -106,12 +106,22 @@ func theDarkness(g *gocui.Gui, v *gocui.View) error {
}
func wheelsUp(g *gocui.Gui, v *gocui.View) error {
- log.Info("private wheels up")
+ // log.Info("private wheels up")
+ me.stdout.pager -= 2
+ if me.stdout.pager < 0 {
+ me.stdout.pager = 0
+ }
+ me.stdout.tk.refreshStdout()
return nil
}
func wheelsDown(g *gocui.Gui, v *gocui.View) error {
- log.Info("you've landed")
+ // log.Info("you've landed")
+ me.stdout.pager += 2
+ if me.stdout.pager > len(me.stdout.outputS) {
+ me.stdout.pager = len(me.stdout.outputS)
+ }
+ me.stdout.tk.refreshStdout()
return nil
}