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

Method setCellFromCodepoint

src/common/buffer/BufferLine.ts:215–222  ·  view source on GitHub ↗

* Set cell data from input handler. * Since the input handler see the incoming chars as UTF32 codepoints, * it gets an optimized access method.

(index: number, codePoint: number, width: number, attrs: IAttributeData)

Source from the content-addressed store, hash-verified

213 * it gets an optimized access method.
214 */
215 public setCellFromCodepoint(index: number, codePoint: number, width: number, attrs: IAttributeData): void {
216 if (attrs.bg & BgFlags.HAS_EXTENDED) {
217 this._extendedAttrs[index] = attrs.extended;
218 }
219 this._data[index * CELL_SIZE + Cell.CONTENT] = codePoint | (width << Content.WIDTH_SHIFT);
220 this._data[index * CELL_SIZE + Cell.FG] = attrs.fg;
221 this._data[index * CELL_SIZE + Cell.BG] = attrs.bg;
222 }
223
224 /**
225 * Add a codepoint to a cell from input handler.

Callers 3

insertCellsMethod · 0.95
deleteCellsMethod · 0.95
replaceCellsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected