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

Method scrollRight

src/common/InputHandler.ts:1507–1519  ·  view source on GitHub ↗

* CSI Ps SP A Scroll right Ps columns (default = 1) (SR) ECMA-48 * * Notation: (Pn) * Representation: CSI Pn 02/00 04/01 * Parameter default value: Pn = 1 * SR causes the data in the presentation component to be moved by n character positions * if the line orientation is horizonta

(params: IParams)

Source from the content-addressed store, hash-verified

1505 * SL has no effect outside of the scroll margins.
1506 */
1507 public scrollRight(params: IParams): boolean {
1508 if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) {
1509 return true;
1510 }
1511 const param = params.params[0] || 1;
1512 for (let y = this._activeBuffer.scrollTop; y <= this._activeBuffer.scrollBottom; ++y) {
1513 const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + y)!;
1514 line.insertCells(0, param, this._activeBuffer.getNullCell(this._eraseAttrData()));
1515 line.isWrapped = false;
1516 }
1517 this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);
1518 return true;
1519 }
1520
1521 /**
1522 * CSI Pm ' }

Callers 1

constructorMethod · 0.95

Calls 5

_eraseAttrDataMethod · 0.95
getMethod · 0.65
insertCellsMethod · 0.65
getNullCellMethod · 0.65
markRangeDirtyMethod · 0.65

Tested by

no test coverage detected