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

Method insertChars

src/common/InputHandler.ts:1381–1393  ·  view source on GitHub ↗

* CSI Ps @ * Insert Ps (Blank) Character(s) (default = 1) (ICH). * * @vt: #Y CSI ICH "Insert Characters" "CSI Ps @" "Insert `Ps` (blank) characters (default = 1)." * The ICH sequence inserts `Ps` blank characters. The cursor remains at the beginning of the * blank characters. Text

(params: IParams)

Source from the content-addressed store, hash-verified

1379 * FIXME: check against xterm - should not work outside of scroll margins (see VT520 manual)
1380 */
1381 public insertChars(params: IParams): boolean {
1382 this._restrictCursor();
1383 const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
1384 if (line) {
1385 line.insertCells(
1386 this._activeBuffer.x,
1387 params.params[0] || 1,
1388 this._activeBuffer.getNullCell(this._eraseAttrData())
1389 );
1390 this._dirtyRowTracker.markDirty(this._activeBuffer.y);
1391 }
1392 return true;
1393 }
1394
1395 /**
1396 * CSI Ps P

Callers 1

constructorMethod · 0.95

Calls 6

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

Tested by

no test coverage detected