Kernel/VTerm - Implemented \ec, reset settings
authorJohn Hodge <[email protected]>
Sun, 8 Sep 2013 12:10:13 +0000 (20:10 +0800)
committerJohn Hodge <[email protected]>
Sun, 8 Sep 2013 12:10:13 +0000 (20:10 +0800)
KernelLand/Kernel/drv/vterm_vt100.c

index 83c7a20..c054e75 100644 (file)
@@ -139,10 +139,6 @@ void VT_int_ParseEscape_StandardLarge(tVTerm *Term, char CmdChar, int argc, int
                        Term->WritePos = args[0] + args[1]*Term->TextWidth;
                //Log_Debug("VTerm", "args = {%i, %i}", args[0], args[1]);
                break;
-//     // Reset formatting?
-//     case 'R':
-//             Term->CurColour = DEFAULT_COLOUR;
-//             break;
        // Scroll up `n` lines
        case 'S':
                tmp = -1;
@@ -360,6 +356,12 @@ int VT_int_ParseEscape(tVTerm *Term, const char *Buffer, size_t Bytes)
        case '\0':
                // Ignore \0
                break;
+       // Reset all attributes
+       case 'c':
+               Term->CurColour = DEFAULT_COLOUR;
+               Term->Flags = 0;
+               Term->ScrollHeight = 0;
+               break;
        default:
                //Log_Notice("VTerm", "TODO: Handle short escape codes");
                {

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