summaryrefslogtreecommitdiffstats
path: root/src/parser.l
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-09-15 23:28:21 -0400
committerJesse Luehrs <doy@tozt.net>2014-09-15 23:28:21 -0400
commit77756c0cb189f837ad177f2f6da97acd7d1204c9 (patch)
tree79e00c1771bd907a29b4c6c12398a9f373be337c /src/parser.l
parentbe88a8a25b02b8a4c267faa5523189406aecaf78 (diff)
downloadlibvt100-77756c0cb189f837ad177f2f6da97acd7d1204c9.tar.gz
libvt100-77756c0cb189f837ad177f2f6da97acd7d1204c9.zip
eat the entire OSC sequence instead of just the \e]
Diffstat (limited to 'src/parser.l')
-rw-r--r--src/parser.l14
1 files changed, 4 insertions, 10 deletions
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;
<<EOF>> 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} {