summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-10-17 23:00:52 -0400
committerJesse Luehrs <doy@tozt.net>2014-10-17 23:01:47 -0400
commite14d7bb899ecec4aaca2347e92c5512292d3788a (patch)
tree99af448f7802361effaae86b75ce881b39ff49d7
parentcb6ee624f72d75b228f5c6c4395b00a709829465 (diff)
downloadlibvt100-e14d7bb899ecec4aaca2347e92c5512292d3788a.tar.gz
libvt100-e14d7bb899ecec4aaca2347e92c5512292d3788a.zip
don't need a trailing [0-9;] for a CSI sequence to be incomplete
this should fix "unhandled CSI sequence: \033[?", and hopefully the issue i was seeing where escape sequences were being split
-rw-r--r--src/parser.l13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/parser.l b/src/parser.l
index c11d87f..e5edbec 100644
--- a/src/parser.l
+++ b/src/parser.l
@@ -177,13 +177,12 @@ static void vt100_parser_handle_text(VT100Screen *vt, char *text, size_t len);
{ASCII}+ vt100_parser_handle_ascii(yyextra, yytext, yyleng);
{CHAR}+ vt100_parser_handle_text(yyextra, yytext, yyleng);
-{LEAD2} |
-{LEAD3}{CONT}? |
-{LEAD4}{CONT}?{CONT}? |
-{CSI}[<=?]?{CSIPARAMS}[0-9;] |
-{CSI} |
-{OSC}{CHAR}* |
-{ESC} return yyleng;
+{LEAD2} |
+{LEAD3}{CONT}? |
+{LEAD4}{CONT}?{CONT}? |
+{CSI}[<=?]?{CSIPARAMS}[0-9;]? |
+{OSC}{CHAR}* |
+{ESC} return yyleng;
<<EOF>> return 0;