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

Method createOpView

termui/show_bug.go:386–404  ·  view source on GitHub ↗
(g *gocui.Gui, name string, x0 int, y0 int, maxX int, height int, selectable bool)

Source from the content-addressed store, hash-verified

384}
385
386func (sb *showBug) createOpView(g *gocui.Gui, name string, x0 int, y0 int, maxX int, height int, selectable bool) (*gocui.View, error) {
387 v, err := g.SetView(name, x0, y0, maxX, y0+height+1, 0)
388
389 if err != nil && !errors.Is(err, gocui.ErrUnknownView) {
390 return nil, err
391 }
392
393 sb.childViews = append(sb.childViews, name)
394
395 if selectable {
396 sb.mainSelectableView = append(sb.mainSelectableView, name)
397 }
398
399 v.Frame = sb.selected == name
400
401 v.Clear()
402
403 return v, nil
404}
405
406func (sb *showBug) createSideView(g *gocui.Gui, name string, x0 int, y0 int, maxX int, height int) (*gocui.View, error) {
407 v, err := g.SetView(name, x0, y0, maxX, y0+height+1, 0)

Callers 1

renderMainMethod · 0.95

Calls 1

ClearMethod · 0.65

Tested by

no test coverage detected