Fix parser not resetting state for some escape sequences
This commit is contained in:
@@ -286,36 +286,43 @@ export class Parser {
|
|||||||
// Single Shift Select of G2 Character Set
|
// Single Shift Select of G2 Character Set
|
||||||
// ( SS2 is 0x8e). This affects next character only.
|
// ( SS2 is 0x8e). This affects next character only.
|
||||||
case 'N':
|
case 'N':
|
||||||
|
this._state = ParserState.NORMAL;
|
||||||
break;
|
break;
|
||||||
// ESC O
|
// ESC O
|
||||||
// Single Shift Select of G3 Character Set
|
// Single Shift Select of G3 Character Set
|
||||||
// ( SS3 is 0x8f). This affects next character only.
|
// ( SS3 is 0x8f). This affects next character only.
|
||||||
case 'O':
|
case 'O':
|
||||||
|
this._state = ParserState.NORMAL;
|
||||||
break;
|
break;
|
||||||
// ESC n
|
// ESC n
|
||||||
// Invoke the G2 Character Set as GL (LS2).
|
// Invoke the G2 Character Set as GL (LS2).
|
||||||
case 'n':
|
case 'n':
|
||||||
this._terminal.setgLevel(2);
|
this._terminal.setgLevel(2);
|
||||||
|
this._state = ParserState.NORMAL;
|
||||||
break;
|
break;
|
||||||
// ESC o
|
// ESC o
|
||||||
// Invoke the G3 Character Set as GL (LS3).
|
// Invoke the G3 Character Set as GL (LS3).
|
||||||
case 'o':
|
case 'o':
|
||||||
this._terminal.setgLevel(3);
|
this._terminal.setgLevel(3);
|
||||||
|
this._state = ParserState.NORMAL;
|
||||||
break;
|
break;
|
||||||
// ESC |
|
// ESC |
|
||||||
// Invoke the G3 Character Set as GR (LS3R).
|
// Invoke the G3 Character Set as GR (LS3R).
|
||||||
case '|':
|
case '|':
|
||||||
this._terminal.setgLevel(3);
|
this._terminal.setgLevel(3);
|
||||||
|
this._state = ParserState.NORMAL;
|
||||||
break;
|
break;
|
||||||
// ESC }
|
// ESC }
|
||||||
// Invoke the G2 Character Set as GR (LS2R).
|
// Invoke the G2 Character Set as GR (LS2R).
|
||||||
case '}':
|
case '}':
|
||||||
this._terminal.setgLevel(2);
|
this._terminal.setgLevel(2);
|
||||||
|
this._state = ParserState.NORMAL;
|
||||||
break;
|
break;
|
||||||
// ESC ~
|
// ESC ~
|
||||||
// Invoke the G1 Character Set as GR (LS1R).
|
// Invoke the G1 Character Set as GR (LS1R).
|
||||||
case '~':
|
case '~':
|
||||||
this._terminal.setgLevel(1);
|
this._terminal.setgLevel(1);
|
||||||
|
this._state = ParserState.NORMAL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// ESC 7 Save Cursor (DECSC).
|
// ESC 7 Save Cursor (DECSC).
|
||||||
|
|||||||
Reference in New Issue
Block a user