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

Method cursorPosition

src/common/InputHandler.ts:1001–1009  ·  view source on GitHub ↗

* CSI Ps ; Ps H * Cursor Position [row;column] (default = [1,1]) (CUP). * * @vt: #Y CSI CUP "Cursor Position" "CSI Ps ; Ps H" "Set cursor to position [`Ps`, `Ps`] (default = [1, 1])." * If ORIGIN mode is set, places the cursor to the absolute position within the scroll margins. *

(params: IParams)

Source from the content-addressed store, hash-verified

999 * Note that the coordinates are 1-based, thus the top left position starts at `1 ; 1`.
1000 */
1001 public cursorPosition(params: IParams): boolean {
1002 this._setCursor(
1003 // col
1004 (params.length >= 2) ? (params.params[1] || 1) - 1 : 0,
1005 // row
1006 (params.params[0] || 1) - 1
1007 );
1008 return true;
1009 }
1010
1011 /**
1012 * CSI Pm ` Character Position Absolute

Callers 2

constructorMethod · 0.95
hVPositionMethod · 0.95

Calls 1

_setCursorMethod · 0.95

Tested by

no test coverage detected