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

Method cursorClamp

termui/bug_table.go:410–419  ·  view source on GitHub ↗
(v *gocui.View)

Source from the content-addressed store, hash-verified

408}
409
410func (bt *bugTable) cursorClamp(v *gocui.View) error {
411 y := bt.selectCursor
412
413 y = minInt(y, bt.getTableLength()-1)
414 y = maxInt(y, 0)
415
416 bt.selectCursor = y
417
418 return nil
419}
420
421func (bt *bugTable) nextPage(g *gocui.Gui, v *gocui.View) error {
422 _, max := v.Size()

Callers 1

layoutMethod · 0.95

Calls 3

getTableLengthMethod · 0.95
minIntFunction · 0.85
maxIntFunction · 0.85

Tested by

no test coverage detected