| 384 | } |
| 385 | |
| 386 | func (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 | |
| 406 | func (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) |