Browse Source

* fixed bug. Clrscr and Clreol didn't take change in textattr in account.

michael 27 years ago
parent
commit
7626011f1f
1 changed files with 22 additions and 2 deletions
  1. 22 2
      rtl/linux/crt.pp

+ 22 - 2
rtl/linux/crt.pp

@@ -457,7 +457,6 @@ begin
   if a<>TextAttr then
   if a<>TextAttr then
    begin
    begin
      if not Redir then
      if not Redir then
-
       ttySendStr(Attr2Ansi(a,TextAttr));
       ttySendStr(Attr2Ansi(a,TextAttr));
      TextAttr:=a;
      TextAttr:=a;
      OldTextAttr:=a;
      OldTextAttr:=a;
@@ -686,7 +685,16 @@ Procedure ClrScr;
 Var
 Var
   CY        : Integer;
   CY        : Integer;
   oldflush  : boolean;
   oldflush  : boolean;
+  I : Integer;
+  
 Begin
 Begin
+  { See if color has changed } 
+  if OldTextAttr<>TextAttr then
+   begin
+     i:=TextAttr;
+     TextAttr:=OldTextAttr;
+     ttyColor(i);
+   end;
   oldflush:=ttySetFlush(Flushing);
   oldflush:=ttySetFlush(Flushing);
   if FullWin then
   if FullWin then
    begin
    begin
@@ -712,7 +720,16 @@ Procedure ClrEol;
 {
 {
   Clear from current position to end of line.
   Clear from current position to end of line.
 }
 }
+Var I : integer;
+
 Begin
 Begin
+  { See if color has changed } 
+  if OldTextAttr<>TextAttr then
+   begin
+     i:=TextAttr;
+     TextAttr:=OldTextAttr;
+     ttyColor(i);
+   end;
   if FullWin then
   if FullWin then
    begin
    begin
      if not Redir then
      if not Redir then
@@ -1444,7 +1461,10 @@ Begin
 End.
 End.
 {
 {
   $Log$
   $Log$
-  Revision 1.2  1998-04-05 13:56:54  peter
+  Revision 1.3  1998-04-16 07:49:11  michael
+  * fixed bug. Clrscr and Clreol didn't take change in textattr in account.
+
+  Revision 1.2  1998/04/05 13:56:54  peter
     - fixed mouse to compile with $i386_att
     - fixed mouse to compile with $i386_att
     + linux crt supports redirecting (not Esc-codes anymore)
     + linux crt supports redirecting (not Esc-codes anymore)