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

Method restoreCursor

src/common/InputHandler.ts:2916–2927  ·  view source on GitHub ↗

* CSI u * ESC 8 * Restore cursor (ANSI.SYS). * * @vt: #P[TODO...] CSI SCORC "Restore Cursor" "CSI u" "Restore cursor position, charmap and text attributes." * @vt: #Y ESC RC "Restore Cursor" "ESC 8" "Restore cursor position, charmap and text attributes."

(params?: IParams)

Source from the content-addressed store, hash-verified

2914 * @vt: #Y ESC RC "Restore Cursor" "ESC 8" "Restore cursor position, charmap and text attributes."
2915 */
2916 public restoreCursor(params?: IParams): boolean {
2917 this._activeBuffer.x = this._activeBuffer.savedX || 0;
2918 this._activeBuffer.y = Math.max(this._activeBuffer.savedY - this._activeBuffer.ybase, 0);
2919 this._curAttrData.fg = this._activeBuffer.savedCurAttrData.fg;
2920 this._curAttrData.bg = this._activeBuffer.savedCurAttrData.bg;
2921 this._charsetService.charset = (this as any)._savedCharset;
2922 if (this._activeBuffer.savedCharset) {
2923 this._charsetService.charset = this._activeBuffer.savedCharset;
2924 }
2925 this._restrictCursor();
2926 return true;
2927 }
2928
2929
2930 /**

Callers 2

constructorMethod · 0.95
resetModePrivateMethod · 0.95

Calls 1

_restrictCursorMethod · 0.95

Tested by

no test coverage detected