package glyph import "github.com/mattn/go-runewidth" // Width returns the terminal column width of a rune. // Tabs use a fixed width of 8 columns. // TODO: handle Unicode marks. func Width(r rune) int { switch r { case '\t': return 8 default: return runewidth.RuneWidth(r) } }