func (cb *CellBuffer) SetContent(x int, y int,
	mainc rune, combc []rune, style Style) {
	if x >= 0 && y >= 0 && x < cb.w && y < cb.h {
		c := &cb.cells[(y*cb.w)+x]
		i := 0
		for i < len(combc) {
			r := combc[i]
			if runewidth.RuneWidth(r) != 0 {
				combc = append(combc[:i-1], combc[i+1:]...)
				continue
			}
			i++
		}
		if c.currMain != mainc {
			c.width = runewidth.RuneWidth(mainc)
		}
		c.currMain = mainc
		c.currComb = combc
		c.currStyle = style
	}
}
SetContent sets the contents (primary rune, combining runes,
and style) for a cell at a given location.
package tcell
import (
	"github.com/mattn/go-runewidth"
)
type cell struct {
	currMain  rune
	currComb  []rune
	currStyle Style
	lastMain  rune
	lastStyle Style
	lastComb  []rune
	width     int
}
type CellBuffer struct {
	w     int
	h     int
	cells []cell
}