Skip to content

Commit bf83ea0

Browse files
committed
better read ahead condition
1 parent b7e535e commit bf83ea0

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

src/common/parser/EscapeSequenceParser.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -888,13 +888,14 @@ export class EscapeSequenceParser extends Disposable implements IEscapeSequenceP
888888
case ParserAction.APC_PUT:
889889
// inner loop - exit APC_PUT: 0x18, 0x1a, 0x1b, 0x9c
890890
// allowed: 00/08 .. 00/13, 02/00 .. 07/14 + NON_ASCII_PRINTABLE
891-
// FIXME: 00/08 .. 00/13 currently handled by second APC_PUT invocation
892891
for (let j = i + 1; ; ++j) {
893-
if (j >= length || data[j] < 0x20 || (data[j] >= 0x7f && data[j] < NON_ASCII_PRINTABLE)) {
894-
this._apcParser.put(data, i, j);
895-
i = j - 1;
896-
break;
897-
}
892+
if (j < length && (
893+
(data[j] >= 0x20 && data[j] < 0x7f) || (data[j] >= 0x08 && data[j] < 0x0e) || data[j] >= NON_ASCII_PRINTABLE
894+
)
895+
) continue;
896+
this._apcParser.put(data, i, j);
897+
i = j - 1;
898+
break;
898899
}
899900
break;
900901
case ParserAction.APC_END:

0 commit comments

Comments
 (0)