MCPcopy Index your code
hub / github.com/xtermjs/xterm.js / loadCell

Method loadCell

src/common/buffer/BufferLine.ts:181–193  ·  view source on GitHub ↗

* Load data at `index` into `cell`. This is used to access cells in a way that's more friendly * to GC as it significantly reduced the amount of new objects/references needed.

(index: number, cell: ICellData)

Source from the content-addressed store, hash-verified

179 * to GC as it significantly reduced the amount of new objects/references needed.
180 */
181 public loadCell(index: number, cell: ICellData): ICellData {
182 $startIndex = index * CELL_SIZE;
183 cell.content = this._data[$startIndex + Cell.CONTENT];
184 cell.fg = this._data[$startIndex + Cell.FG];
185 cell.bg = this._data[$startIndex + Cell.BG];
186 if (cell.content & Content.IS_COMBINED_MASK) {
187 cell.combinedData = this._combined[index];
188 }
189 if (cell.bg & BgFlags.HAS_EXTENDED) {
190 cell.extended = this._extendedAttrs[index]!;
191 }
192 return cell;
193 }
194
195 /**
196 * Set data at `index` to `cell`.

Callers 2

insertCellsMethod · 0.95
deleteCellsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected