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

Method _setCursor

src/common/InputHandler.ts:872–883  ·  view source on GitHub ↗

* Set absolute cursor position.

(x: number, y: number)

Source from the content-addressed store, hash-verified

870 * Set absolute cursor position.
871 */
872 private _setCursor(x: number, y: number): void {
873 this._dirtyRowTracker.markDirty(this._activeBuffer.y);
874 if (this._coreService.decPrivateModes.origin) {
875 this._activeBuffer.x = x;
876 this._activeBuffer.y = this._activeBuffer.scrollTop + y;
877 } else {
878 this._activeBuffer.x = x;
879 this._activeBuffer.y = y;
880 }
881 this._restrictCursor();
882 this._dirtyRowTracker.markDirty(this._activeBuffer.y);
883 }
884
885 /**
886 * Set relative cursor position.

Callers 9

_moveCursorMethod · 0.95
cursorCharAbsoluteMethod · 0.95
cursorPositionMethod · 0.95
charPosAbsoluteMethod · 0.95
linePosAbsoluteMethod · 0.95
setModePrivateMethod · 0.95
resetModePrivateMethod · 0.95
setScrollRegionMethod · 0.95

Calls 2

_restrictCursorMethod · 0.95
markDirtyMethod · 0.65

Tested by

no test coverage detected