guardRows method

void guardRows(
  1. int count
)

Guards the top count rows of the screen and every line in history: writing to, erasing or moving one of them is an error, wherever scrolling or a resize takes it.

Implementation

void guardRows(int count) {
  _guarded.addAll(history);
  for (var y = 0; y < count; y++) {
    _guarded.add(_grid[y]);
  }
}