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