add method

void add(
  1. String buffer
)

Add a new line to the scrollback buffer. This would normally happen when the user finishes typing/editing the line and taps the 'enter' key.

Implementation

void add(String buffer) {
  // don't add blank line to scrollback history if !recordBlanks
  if (buffer == '' && !recordBlanks) {
    return;
  }
  lineList.add(buffer);
  lineIndex = lineList.length;
  currentLineBuffer = null;
}