clearWideCellAt method

void clearWideCellAt(
  1. int index,
  2. CursorStyle style
)

Implementation

void clearWideCellAt(int index, CursorStyle style) {
  if (index < 0 || index >= _length) return;

  if (getWidth(index) == 2) {
    eraseCell(index, style);
    if (index + 1 < _length) {
      eraseCell(index + 1, style);
    }
    return;
  }

  if (index > 0 && getWidth(index - 1) == 2) {
    eraseCell(index - 1, style);
    eraseCell(index, style);
  }
}