mouse scroll in stdout
This commit is contained in:
parent
5a9f3565aa
commit
22cda9acdb
|
@ -106,12 +106,22 @@ func theDarkness(g *gocui.Gui, v *gocui.View) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func wheelsUp(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
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func wheelsDown(g *gocui.Gui, v *gocui.View) error {
|
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
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue