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

Method _eraseInBufferLine

src/common/InputHandler.ts:1147–1158  ·  view source on GitHub ↗

* Helper method to erase cells in a terminal row. * The cell gets replaced with the eraseChar of the terminal. * @param y The row index relative to the viewport. * @param start The start x index of the range to be erased. * @param end The end x index of the range to be erased (exclusive)

(y: number, start: number, end: number, clearWrap: boolean = false, respectProtect: boolean = false)

Source from the content-addressed store, hash-verified

1145 * @param respectProtect Whether to respect the protection attribute (DECSCA).
1146 */
1147 private _eraseInBufferLine(y: number, start: number, end: number, clearWrap: boolean = false, respectProtect: boolean = false): void {
1148 const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + y)!;
1149 line.replaceCells(
1150 start,
1151 end,
1152 this._activeBuffer.getNullCell(this._eraseAttrData()),
1153 respectProtect
1154 );
1155 if (clearWrap) {
1156 line.isWrapped = false;
1157 }
1158 }
1159
1160 /**
1161 * Helper method to reset cells in a terminal row. The cell gets replaced with the eraseChar of

Callers 2

eraseInDisplayMethod · 0.95
eraseInLineMethod · 0.95

Calls 4

_eraseAttrDataMethod · 0.95
getMethod · 0.65
replaceCellsMethod · 0.65
getNullCellMethod · 0.65

Tested by

no test coverage detected