mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Move all parser state handling into the parser
This commit is contained in:
@@ -206,11 +206,13 @@ export class Parser {
|
||||
;
|
||||
case 'D':
|
||||
this._terminal.index();
|
||||
this.state = ParserState.NORMAL;
|
||||
break;
|
||||
|
||||
// ESC M Reverse Index ( RI is 0x8d).
|
||||
case 'M':
|
||||
this._terminal.reverseIndex();
|
||||
this.state = ParserState.NORMAL;
|
||||
break;
|
||||
|
||||
// ESC % Select default/utf-8 character set.
|
||||
@@ -319,6 +321,7 @@ export class Parser {
|
||||
// ESC H Tab Set (HTS is 0x88).
|
||||
case 'H':
|
||||
this._terminal.tabSet();
|
||||
this.state = ParserState.NORMAL;
|
||||
break;
|
||||
|
||||
// ESC = Application Keypad (DECKPAM).
|
||||
|
||||
@@ -148,7 +148,6 @@ function Terminal(options) {
|
||||
this.cursorState = 0;
|
||||
this.cursorHidden = false;
|
||||
this.convertEol;
|
||||
this.state = 0;
|
||||
this.queue = '';
|
||||
this.scrollTop = 0;
|
||||
this.scrollBottom = this.rows - 1;
|
||||
@@ -2173,7 +2172,6 @@ Terminal.prototype.index = function() {
|
||||
this.y--;
|
||||
this.scroll();
|
||||
}
|
||||
this.state = normal;
|
||||
};
|
||||
|
||||
|
||||
@@ -2195,7 +2193,6 @@ Terminal.prototype.reverseIndex = function() {
|
||||
} else {
|
||||
this.y--;
|
||||
}
|
||||
this.state = normal;
|
||||
};
|
||||
|
||||
|
||||
@@ -2218,7 +2215,6 @@ Terminal.prototype.reset = function() {
|
||||
*/
|
||||
Terminal.prototype.tabSet = function() {
|
||||
this.tabs[this.x] = true;
|
||||
this.state = normal;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user