From: John Hodge Date: Sun, 31 Oct 2010 12:29:36 +0000 (+0800) Subject: Fixed scrolling bug in VTerm X-Git-Tag: rel0.06~1 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=fe313c1dda9bd0e062f5ce88c3d990199799aa1b;p=tpg%2Facess2.git Fixed scrolling bug in VTerm - VT_int_ClearLine was rejecting valid line numbers --- diff --git a/Kernel/drv/vterm.c b/Kernel/drv/vterm.c index 5ba34082..720e76b0 100644 --- a/Kernel/drv/vterm.c +++ b/Kernel/drv/vterm.c @@ -843,7 +843,7 @@ void VT_int_ClearLine(tVTerm *Term, int Num) { int i; tVT_Char *cell = &Term->Text[ Num*Term->TextWidth ]; - if( Num < 0 || Num >= Term->TextHeight ) return ; + if( Num < 0 || Num >= Term->TextHeight * (giVT_Scrollback + 1) ) return ; //ENTER("pTerm iNum", Term, Num); for( i = Term->TextWidth; i--; ) { @@ -1073,8 +1073,6 @@ void VT_int_PutChar(tVTerm *Term, Uint32 Ch) { int base, i; - //Debug("Scrolling entire buffer"); - // Move back by one Term->WritePos -= Term->TextWidth; // Update the scren @@ -1118,6 +1116,7 @@ void VT_int_PutChar(tVTerm *Term, Uint32 Ch) Term->WritePos -= Term->TextWidth; VT_int_UpdateScreen( Term, 0 ); Term->WritePos += Term->TextWidth; + VT_int_ClearLine(Term, Term->WritePos / Term->TextWidth); // Scroll Term->ViewPos += Term->TextWidth;