Usermode/GUI Terminal - Fixed some characters not triggering end of normal text
authorJohn Hodge <[email protected]>
Sun, 8 Sep 2013 11:36:36 +0000 (19:36 +0800)
committerJohn Hodge <[email protected]>
Sun, 8 Sep 2013 11:36:36 +0000 (19:36 +0800)
Usermode/Applications/gui_shell_src/vt100.c

index 0a62ba9..cad4119 100644 (file)
@@ -86,12 +86,21 @@ int Term_HandleVT100(tTerminal *Term, int Len, const char *Buf)
         int    ret = 0;
        while( ret < Len )
        {
-               if( *Buf == '\n' )
+               switch(*Buf)
+               {
+               case '\x1b':
+               case '\b':
+               case '\t':
+               case '\n':
+               case '\r':
+                       // Force an exit right now
+                       Len = ret;
                        break;
-               if( *Buf == '\x1b' )
+               default:
+                       ret ++;
+                       Buf ++;
                        break;
-               ret ++;
-               Buf ++;
+               }
        }
        return -ret;
 }

UCC git Repository :: git.ucc.asn.au