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

Method _resetBufferLine

src/common/InputHandler.ts:1165–1172  ·  view source on GitHub ↗

* Helper method to reset cells in a terminal row. The cell gets replaced with the eraseChar of * the terminal and the isWrapped property is set to false. * @param y row index

(y: number, respectProtect: boolean = false)

Source from the content-addressed store, hash-verified

1163 * @param y row index
1164 */
1165 private _resetBufferLine(y: number, respectProtect: boolean = false): void {
1166 const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + y);
1167 if (line) {
1168 line.fill(this._activeBuffer.getNullCell(this._eraseAttrData()), respectProtect);
1169 this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase + y);
1170 line.isWrapped = false;
1171 }
1172 }
1173
1174 /**
1175 * CSI Ps J Erase in Display (ED).

Callers 1

eraseInDisplayMethod · 0.95

Calls 5

_eraseAttrDataMethod · 0.95
getMethod · 0.65
fillMethod · 0.65
getNullCellMethod · 0.65
clearMarkersMethod · 0.65

Tested by

no test coverage detected