Prevent exception switching to alt buffer before open()

Fixes #892
This commit is contained in:
Daniel Imms
2017-08-17 08:36:08 -07:00
parent f3d375a7a8
commit b5fc054fa5
+6 -2
View File
@@ -341,7 +341,9 @@ export class Parser {
case '=':
this._terminal.log('Serial port requested application keypad.');
this._terminal.applicationKeypad = true;
this._terminal.viewport.syncScrollArea();
if (this._terminal.viewport) {
this._terminal.viewport.syncScrollArea();
}
this._state = ParserState.NORMAL;
break;
@@ -349,7 +351,9 @@ export class Parser {
case '>':
this._terminal.log('Switching back to normal keypad.');
this._terminal.applicationKeypad = false;
this._terminal.viewport.syncScrollArea();
if (this._terminal.viewport) {
this._terminal.viewport.syncScrollArea();
}
this._state = ParserState.NORMAL;
break;