code: func (g *Gui) draw(v *View) error {
  	if g.Cursor {
  		if curview := g.currentView; curview != nil {
  			vMaxX, vMaxY := curview.Size()
  			if curview.cx < 0 {
  				curview.cx = 0
  			} else if curview.cx >= vMaxX {
  				curview.cx = vMaxX - 1
  			}
  			if curview.cy < 0 {
  				curview.cy = 0
  			} else if curview.cy >= vMaxY {
  				curview.cy = vMaxY - 1
  			}
  
  			gMaxX, gMaxY := g.Size()
  			cx, cy := curview.x0+curview.cx+1, curview.y0+curview.cy+1
  			if cx >= 0 && cx < gMaxX && cy >= 0 && cy < gMaxY {
  				termbox.SetCursor(cx, cy)
  			} else {
  				termbox.HideCursor()
  			}
  		}
  	} else {
  		termbox.HideCursor()
  	}
  
  	v.clearRunes()
  	if err := v.draw(); err != nil {
  		return err
  	}
  	return nil
  }
docs: // draw manages the cursor and calls the draw function of a view.