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

Method cursorDown

termui/bug_table.go:370–388  ·  view source on GitHub ↗
(g *gocui.Gui, v *gocui.View)

Source from the content-addressed store, hash-verified

368}
369
370func (bt *bugTable) cursorDown(g *gocui.Gui, v *gocui.View) error {
371 // If we are at the bottom of the page, switch to the next one.
372 if bt.selectCursor+1 > bt.getTableLength()-1 {
373 _, max := v.Size()
374
375 if bt.pageCursor+max >= len(bt.allIds) {
376 return nil
377 }
378
379 bt.pageCursor += max
380 bt.selectCursor = 0
381
382 return bt.doPaginate(max)
383 }
384
385 bt.selectCursor = minInt(bt.selectCursor+1, bt.getTableLength()-1)
386
387 return nil
388}
389
390func (bt *bugTable) cursorUp(g *gocui.Gui, v *gocui.View) error {
391 // If we are at the top of the page, switch to the previous one.

Callers

nothing calls this directly

Calls 4

getTableLengthMethod · 0.95
doPaginateMethod · 0.95
minIntFunction · 0.85
SizeMethod · 0.45

Tested by

no test coverage detected