terminology: Check for 7-bit ST (ESC \)

SVN revision: 77484
This commit is contained in:
Sebastian Dransfeld 2012-10-04 23:18:54 +00:00
parent 2b8026c24c
commit 64d87067ba
1 changed files with 7 additions and 1 deletions

View File

@ -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])
{