From 77756c0cb189f837ad177f2f6da97acd7d1204c9 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 15 Sep 2014 23:28:21 -0400 Subject: eat the entire OSC sequence instead of just the \e] --- src/parser.l | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/parser.l') diff --git a/src/parser.l b/src/parser.l index 8d63b05..f36a4e6 100644 --- a/src/parser.l +++ b/src/parser.l @@ -174,7 +174,7 @@ static void vt100_parser_handle_text(VT100Screen *vt, char *text, size_t len); {LEAD4}{CONT}?{CONT}? | {CSI}[<=?]?{CSIPARAMS}[0-9;] | {CSI} | -{OSC} | +{OSC}{CHAR}* | {ESC} return yyleng; <> return 0; @@ -191,16 +191,10 @@ static void vt100_parser_handle_text(VT100Screen *vt, char *text, size_t len); (int)yyleng - 1, yytext + 1); } -{OSC}{CTRL} { +{OSC}{CHAR}*{ST} { fprintf(stderr, - "unhandled OSC sequence: \\033%*s\\%hho\n", - (int)yyleng - 2, yytext + 1, yytext[yyleng - 1]); -} - -{OSC}{CHAR} { - fprintf(stderr, - "unhandled OSC sequence: \\033%*s\n", - (int)yyleng - 1, yytext + 1); + "unhandled OSC sequence: \\033%*s\\007\n", + (int)yyleng - 2, yytext + 1); } {ESC}{CTRL} { -- cgit v1.2.3-54-g00ecf