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

Method softReset

src/common/InputHandler.ts:2720–2739  ·  view source on GitHub ↗

* CSI ! p Soft terminal reset (DECSTR). * http://vt100.net/docs/vt220-rm/table4-10.html * * @vt: #Y CSI DECSTR "Soft Terminal Reset" "CSI ! p" "Reset several terminal attributes to initial state." * There are two terminal reset sequences - RIS and DECSTR. While RIS performs almost

(params: IParams)

Source from the content-addressed store, hash-verified

2718 * FIXME: there are several more attributes missing (see VT520 manual)
2719 */
2720 public softReset(params: IParams): boolean {
2721 this._coreService.isCursorHidden = false;
2722 this._onRequestSyncScrollBar.fire();
2723 this._activeBuffer.scrollTop = 0;
2724 this._activeBuffer.scrollBottom = this._bufferService.rows - 1;
2725 this._curAttrData = DEFAULT_ATTR_DATA.clone();
2726 this._coreService.reset();
2727 this._charsetService.reset();
2728
2729 // reset DECSC data
2730 this._activeBuffer.savedX = 0;
2731 this._activeBuffer.savedY = this._activeBuffer.ybase;
2732 this._activeBuffer.savedCurAttrData.fg = this._curAttrData.fg;
2733 this._activeBuffer.savedCurAttrData.bg = this._curAttrData.bg;
2734 this._activeBuffer.savedCharset = this._charsetService.charset;
2735
2736 // reset DECOM
2737 this._coreService.decPrivateModes.origin = false;
2738 return true;
2739 }
2740
2741 /**
2742 * CSI Ps SP q Set cursor style (DECSCUSR, VT520).

Callers 1

constructorMethod · 0.95

Calls 3

cloneMethod · 0.65
resetMethod · 0.65
fireMethod · 0.45

Tested by

no test coverage detected