From: John Hodge Date: Wed, 23 Sep 2009 05:24:24 +0000 (+0800) Subject: Fixed VTerm scrolling X-Git-Tag: rel0.06~531 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=ed9e279c18ed6ac86bd38b090f4faec637c205bf;p=tpg%2Facess2.git Fixed VTerm scrolling --- diff --git a/Kernel/drv/vterm.c b/Kernel/drv/vterm.c index e3e78132..45ac6bd0 100644 --- a/Kernel/drv/vterm.c +++ b/Kernel/drv/vterm.c @@ -88,6 +88,7 @@ char *gsVT_InputDevice = NULL; // === CODE === /** * \fn int VT_Install(char **Arguments) + * \brief Installs the Virtual Terminal Driver */ int VT_Install(char **Arguments) { @@ -397,6 +398,7 @@ int VT_int_ParseEscape(tVTerm *Term, char *Buffer) memset(Term->Text, 0, Term->Width*Term->Height*VT_SCROLLBACK*sizeof(tVT_Char)); Term->WritePos = 0; Term->ViewPos = 0; + VT_int_UpdateScreen(Term, 1); } break; // Set Font flags @@ -489,7 +491,9 @@ void VT_int_PutChar(tVTerm *Term, Uint32 Ch) Term->WritePos ++; break; } + + // Move Screen if(Term->WritePos >= Term->Width*Term->Height*VT_SCROLLBACK) { int base, i; @@ -515,6 +519,11 @@ void VT_int_PutChar(tVTerm *Term, Uint32 Ch) VT_int_UpdateScreen( Term, 1 ); } + else if(Term->WritePos > Term->Width*Term->Height+Term->ViewPos) + { + Term->ViewPos += Term->Width; + VT_int_UpdateScreen( Term, 1 ); + } else VT_int_UpdateScreen( Term, 0 );