From 3efa0bc1d46a4bcda04763a89d54a6802e717231 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 8 Sep 2013 19:36:36 +0800 Subject: [PATCH] Usermode/GUI Terminal - Fixed some characters not triggering end of normal text --- Usermode/Applications/gui_shell_src/vt100.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/Usermode/Applications/gui_shell_src/vt100.c b/Usermode/Applications/gui_shell_src/vt100.c index 0a62ba9f..cad41194 100644 --- a/Usermode/Applications/gui_shell_src/vt100.c +++ b/Usermode/Applications/gui_shell_src/vt100.c @@ -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; } -- 2.20.1