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

Method deleteChars

src/common/InputHandler.ts:1407–1419  ·  view source on GitHub ↗

* CSI Ps P * Delete Ps Character(s) (default = 1) (DCH). * * @vt: #Y CSI DCH "Delete Character" "CSI Ps P" "Delete `Ps` characters (default=1)." * As characters are deleted, the remaining characters between the cursor and right margin move to * the left. Character attributes move

(params: IParams)

Source from the content-addressed store, hash-verified

1405 * FIXME: check against xterm - should not work outside of scroll margins (see VT520 manual)
1406 */
1407 public deleteChars(params: IParams): boolean {
1408 this._restrictCursor();
1409 const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
1410 if (line) {
1411 line.deleteCells(
1412 this._activeBuffer.x,
1413 params.params[0] || 1,
1414 this._activeBuffer.getNullCell(this._eraseAttrData())
1415 );
1416 this._dirtyRowTracker.markDirty(this._activeBuffer.y);
1417 }
1418 return true;
1419 }
1420
1421 /**
1422 * CSI Ps S Scroll up Ps lines (default = 1) (SU).

Callers 1

constructorMethod · 0.95

Calls 6

_restrictCursorMethod · 0.95
_eraseAttrDataMethod · 0.95
getMethod · 0.65
deleteCellsMethod · 0.65
getNullCellMethod · 0.65
markDirtyMethod · 0.65

Tested by

no test coverage detected