From 6004ee00fb65afc3ad720eb5b506fb3647548b80 Mon Sep 17 00:00:00 2001 From: englebass Date: Thu, 4 Oct 2012 23:18:54 +0000 Subject: [PATCH] terminology: Check for 7-bit ST (ESC \) git-svn-id: http://svn.enlightenment.org/svn/e/trunk/terminology@77484 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/bin/termptyesc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c index feb6ddc..a7d8185 100644 --- a/src/bin/termptyesc.c +++ b/src/bin/termptyesc.c @@ -20,6 +20,7 @@ #define ST 0x9c // String Terminator #define BEL 0x07 // Bell +#define ESC 033 // Escape static int _csi_arg_get(Eina_Unicode **ptr) @@ -873,12 +874,17 @@ _handle_esc_xterm(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce) b = buf; while ((cc < ce) && (*cc != ST) && (*cc != BEL)) { + if ((cc < ce - 1) && (*cc == ESC) && (*(cc + 1) == '\\')) + { + cc++; + break; + } *b = *cc; b++; cc++; } *b = 0; - if ((*cc == ST) || (*cc == BEL)) cc++; + if ((*cc == ST) || (*cc == BEL) || (*cc == '\\')) cc++; else return -2; switch (buf[0]) { -- 2.7.4