setCell method

void setCell(
  1. int index,
  2. int char,
  3. int width,
  4. CursorStyle style,
)

Implementation

void setCell(int index, int char, int width, CursorStyle style) {
  _repairWideCellPairing(index, width, style);

  _ensureCapacity(index);
  final offset = index * _cellSize;
  _data[offset + _cellForeground] = style.foreground;
  _data[offset + _cellBackground] = style.background;
  _data[offset + _cellAttributes] = style.attrs |
      (style.hyperlinkId << CellAttr.hyperlinkShift) |
      style.semanticAttrs;
  _data[offset + _cellContent] = char | (width << CellContent.widthShift);
  _setUnderlineColor(index, style.underlineColor);
  _combiningCharacters?.remove(index);
}