function fixTextArea() {
  if (this.rows - this.value.split('\n').length < 2) {
    this.rows = Math.max(parseInt(this.rows, 10), this.value.split('\n').length + 5);
  }

  if (this.value.slice(-1) != '\n') {
    this.value += '\n';
  }
}
