MCPcopy Index your code
hub / github.com/git-bug/git-bug / scrollUp

Method scrollUp

termui/show_bug.go:466–479  ·  view source on GitHub ↗
(g *gocui.Gui, v *gocui.View)

Source from the content-addressed store, hash-verified

464}
465
466func (sb *showBug) scrollUp(g *gocui.Gui, v *gocui.View) error {
467 mainView, err := g.View(showBugView)
468 if err != nil {
469 return err
470 }
471
472 _, maxY := mainView.Size()
473
474 sb.scroll -= maxY / 2
475
476 sb.scroll = maxInt(sb.scroll, 0)
477
478 return nil
479}
480
481func (sb *showBug) scrollDown(g *gocui.Gui, v *gocui.View) error {
482 _, maxY := v.Size()

Callers

nothing calls this directly

Calls 2

maxIntFunction · 0.85
SizeMethod · 0.45

Tested by

no test coverage detected