mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
win32.c: pass through unknown sequence
* win32/win32.c (constat_apply): pass through unknown sequence which starts with ESC but is not followed by a bracket. [ruby-core:53879] [Bug #8201] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
adf1c94ffe
commit
111f4a8fe5
1 changed files with 11 additions and 1 deletions
|
@ -5787,9 +5787,19 @@ constat_parse(HANDLE h, struct constat *s, const WCHAR **ptrp, long *lenp)
|
|||
WCHAR wc = *ptr++;
|
||||
if (wc == 0x1b) {
|
||||
rest = *lenp - len - 1;
|
||||
if (s->vt100.state == constat_esc) {
|
||||
rest++; /* reuse this ESC */
|
||||
}
|
||||
s->vt100.state = constat_init;
|
||||
if (len > 0 && *ptr != L'[') continue;
|
||||
s->vt100.state = constat_esc;
|
||||
}
|
||||
else if (s->vt100.state == constat_esc && wc == L'[') {
|
||||
else if (s->vt100.state == constat_esc) {
|
||||
if (wc != L'[') {
|
||||
/* TODO: supply dropped ESC at beginning */
|
||||
s->vt100.state = constat_init;
|
||||
continue;
|
||||
}
|
||||
rest = *lenp - len - 1;
|
||||
if (rest > 0) --rest;
|
||||
s->vt100.state = constat_seq;
|
||||
|
|
Loading…
Add table
Reference in a new issue