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

Method cursorUp

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

Source from the content-addressed store, hash-verified

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.
392 if bt.selectCursor-1 < 0 {
393 _, max := v.Size()
394
395 if bt.pageCursor == 0 {
396 return nil
397 }
398
399 bt.pageCursor = maxInt(0, bt.pageCursor-max)
400 bt.selectCursor = max - 1
401
402 return bt.doPaginate(max)
403 }
404
405 bt.selectCursor = maxInt(bt.selectCursor-1, 0)
406
407 return nil
408}
409
410func (bt *bugTable) cursorClamp(v *gocui.View) error {
411 y := bt.selectCursor

Callers

nothing calls this directly

Calls 3

doPaginateMethod · 0.95
maxIntFunction · 0.85
SizeMethod · 0.45

Tested by

no test coverage detected