MCPcopy
hub / github.com/xtermjs/xterm.js / setCell

Method setCell

src/common/buffer/BufferLine.ts:198–208  ·  view source on GitHub ↗

* Set data at `index` to `cell`.

(index: number, cell: ICellData)

Source from the content-addressed store, hash-verified

196 * Set data at `index` to `cell`.
197 */
198 public setCell(index: number, cell: ICellData): void {
199 if (cell.content & Content.IS_COMBINED_MASK) {
200 this._combined[index] = cell.combinedData;
201 }
202 if (cell.bg & BgFlags.HAS_EXTENDED) {
203 this._extendedAttrs[index] = cell.extended;
204 }
205 this._data[index * CELL_SIZE + Cell.CONTENT] = cell.content;
206 this._data[index * CELL_SIZE + Cell.FG] = cell.fg;
207 this._data[index * CELL_SIZE + Cell.BG] = cell.bg;
208 }
209
210 /**
211 * Set cell data from input handler.

Callers 10

createEmptyLineDataFunction · 0.95
lineDataFunction · 0.95
stringToRowFunction · 0.95
stringArrayToRowFunction · 0.95
constructorMethod · 0.95
insertCellsMethod · 0.95
deleteCellsMethod · 0.95
replaceCellsMethod · 0.95
resizeMethod · 0.95
fillMethod · 0.95

Calls

no outgoing calls

Tested by 4

createEmptyLineDataFunction · 0.76
lineDataFunction · 0.76
stringToRowFunction · 0.76
stringArrayToRowFunction · 0.76