contains method

bool contains(
  1. int row,
  2. int col
)

Returns whether the inclusive selection covers the given cell.

Implementation

bool contains(int row, int col) {
  final current = GhosttyTerminalCellPosition(row: row, col: col);
  final normalized = this.normalized;
  return current.compareTo(normalized.base) >= 0 &&
      current.compareTo(normalized.extent) <= 0;
}