code: func (v *View) Write(p []byte) (n int, err error) {
  	v.tainted = true
  
  	for _, ch := range bytes.Runes(p) {
  		switch ch {
  		case '\n':
  			v.lines = append(v.lines, nil)
  		case '\r':
  			nl := len(v.lines)
  			if nl > 0 {
  				v.lines[nl-1] = nil
  			} else {
  				v.lines = make([][]cell, 1)
  			}
  		default:
  			cells := v.parseInput(ch)
  			if cells == nil {
  				continue
  			}
  
  			nl := len(v.lines)
  			if nl > 0 {
  				v.lines[nl-1] = append(v.lines[nl-1], cells...)
  			} else {
  				v.lines = append(v.lines, cells)
  			}
  		}
  	}
  	return len(p), nil
  }
docs: // Write appends a byte slice into the view's internal buffer. Because
  // View implements the io.Writer interface, it can be passed as parameter
  // of functions like fmt.Fprintf, fmt.Fprintln, io.Copy, etc. Clear must
  // be called to clear the view's buffer.