Fixed VT_int_UpdateScreen to work for lines that are not the first line
authorJohn Hodge <[email protected]>
Tue, 22 Sep 2009 01:53:28 +0000 (09:53 +0800)
committerJohn Hodge <[email protected]>
Tue, 22 Sep 2009 01:53:28 +0000 (09:53 +0800)
Kernel/drv/vterm.c

index 2937b37..f297b9f 100644 (file)
@@ -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]
                        );
        }
 }

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