Skip to content

Commit

Permalink
Merge pull request #668 from Tyriar/fix_pt_valid_var_declarations
Browse files Browse the repository at this point in the history
Declare pt and valid vars in correct spot
  • Loading branch information
Tyriar committed May 22, 2017
2 parents db0338c + ccf1a04 commit 35b32b7
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Parser.ts
Expand Up @@ -471,6 +471,8 @@ export class Parser {
case ParserState.DCS:
if (ch === C0.ESC || ch === C0.BEL) {
if (ch === C0.ESC) this._position++;
let pt;
let valid: boolean;

switch (this._terminal.prefix) {
// User-Defined Keys (DECUDK).
Expand All @@ -480,8 +482,8 @@ export class Parser {
// Request Status String (DECRQSS).
// test: echo -e '\eP$q"p\e\\'
case '$q':
let pt = this._terminal.currentParam
, valid = false;
pt = this._terminal.currentParam;
valid = false;

switch (pt) {
// DECSCA
Expand Down Expand Up @@ -526,9 +528,8 @@ export class Parser {
// This can cause a small glitch in vim.
// test: echo -ne '\eP+q6b64\e\\'
case '+q':
// TODO: Don't declare pt twice
/*let*/ pt = this._terminal.currentParam
, valid = false;
pt = this._terminal.currentParam;
valid = false;

this._terminal.send(C0.ESC + 'P' + +valid + '+r' + pt + C0.ESC + '\\');
break;
Expand Down

0 comments on commit 35b32b7

Please sign in to comment.