code: func (cb *CellBuffer) Resize(w, h int) {
  
  	if cb.h == h && cb.w == w {
  		return
  	}
  
  	newc := make([]cell, w*h)
  	for y := 0; y < h && y < cb.h; y++ {
  		for x := 0; x < w && x < cb.w; x++ {
  			oc := &cb.cells[(y*cb.w)+x]
  			nc := &newc[(y*w)+x]
  			nc.currMain = oc.currMain
  			nc.currComb = oc.currComb
  			nc.currStyle = oc.currStyle
  			nc.width = oc.width
  			nc.lastMain = rune(0)
  		}
  	}
  	cb.cells = newc
  	cb.h = h
  	cb.w = w
  }
docs: // Resize is used to resize the cells array, with different dimensions,
  // while preserving the original contents.  The cells will be invalidated
  // so that they can be redrawn.