copyFrom method

void copyFrom(
  1. BufferLine src,
  2. int srcCol,
  3. int dstCol,
  4. int len,
)

Copies len cells from src starting at srcCol to dstCol at this line.

Implementation

void copyFrom(BufferLine src, int srcCol, int dstCol, int len) {
  resize(dstCol + len);

  _data.setRange(
    dstCol * _cellSize,
    (dstCol + len) * _cellSize,
    src.data,
    srcCol * _cellSize,
  );
  version++;
}