code: func (t *Terminal) addKeyToLine(key rune) {
  	if len(t.line) == cap(t.line) {
  		newLine := make([]rune, len(t.line), 2*(1+len(t.line)))
  		copy(newLine, t.line)
  		t.line = newLine
  	}
  	t.line = t.line[:len(t.line)+1]
  	copy(t.line[t.pos+1:], t.line[t.pos:])
  	t.line[t.pos] = key
  	if t.echo {
  		t.writeLine(t.line[t.pos:])
  	}
  	t.pos++
  	t.moveCursorToPos(t.pos)
  }
docs: // addKeyToLine inserts the given key at the current position in the current
  // line.