From 29aa540ef05d6288dda7dfe7d708c6cd18126e4b Mon Sep 17 00:00:00 2001 From: John Hodge Date: Tue, 22 Sep 2009 09:53:28 +0800 Subject: [PATCH] Fixed VT_int_UpdateScreen to work for lines that are not the first line --- Kernel/drv/vterm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Kernel/drv/vterm.c b/Kernel/drv/vterm.c index 2937b372..f297b9ff 100644 --- a/Kernel/drv/vterm.c +++ b/Kernel/drv/vterm.c @@ -513,11 +513,12 @@ void VT_int_UpdateScreen( tVTerm *Term, int UpdateAll ) &Term->Text[Term->ViewPos] ); } else { + int pos = Term->WritePos - Term->WritePos % Term->Width; VFS_WriteAt( giVT_OutputDevHandle, - Term->ViewPos*sizeof(tVT_Char), + (pos - Term->ViewPos)*sizeof(tVT_Char), Term->Width*sizeof(tVT_Char), - &Term->Text[Term->ViewPos] + &Term->Text[pos] ); } } -- 2.20.1