Browse Source

* Fix for corrupt color-attr after some ACS-mode changes. (Pierre, Strassbourg
meeting)

marco 23 years ago
parent
commit
5ce2af2aaf
1 changed files with 31 additions and 25 deletions
  1. 31 25
      rtl/unix/video.pp

+ 31 - 25
rtl/unix/video.pp

@@ -287,6 +287,31 @@ begin
   Attr2Ansi:=#27'['+hstr+'m';
 end;
 
+procedure UpdateTTY(Force:boolean);
+type
+  tchattr=packed record
+{$ifdef ENDIAN_LITTLE}
+    ch : char;
+    attr : byte;
+{$else}
+    attr : byte;
+    ch : char;
+{$endif}
+  end;
+var
+  outbuf   : array[0..1023+255] of char;
+  chattr   : tchattr;
+  skipped  : boolean;
+  outptr,
+  spaces,
+  eol,
+  x,y,
+  LastX,LastY,
+  SpaceAttr,
+  LastAttr : longint;
+  p,pold   : pvideocell;
+
+
 procedure TransformUsingACS(var st : string);
 var
   res : string;
@@ -310,7 +335,7 @@ begin
         begin
           if InACS then
             begin
-              res:=res+ACSOut;
+              res:=res+ACSOut+Attr2Ansi(LastAttr,0);                    
               InACS:=false;
             end;
           res:=res+ch;
@@ -320,29 +345,6 @@ begin
 end;
 
 
-procedure UpdateTTY(Force:boolean);
-type
-  tchattr=packed record
-{$ifdef ENDIAN_LITTLE}
-    ch : char;
-    attr : byte;
-{$else}
-    attr : byte;
-    ch : char;
-{$endif}
-  end;
-var
-  outbuf   : array[0..1023+255] of char;
-  chattr   : tchattr;
-  skipped  : boolean;
-  outptr,
-  spaces,
-  eol,
-  x,y,
-  LastX,LastY,
-  SpaceAttr,
-  LastAttr : longint;
-  p,pold   : pvideocell;
 
   procedure outdata(hstr:string);
   begin
@@ -822,7 +824,11 @@ initialization
 end.
 {
   $Log$
-  Revision 1.10  2001-10-13 13:00:31  michael
+  Revision 1.11  2002-07-06 16:50:17  marco
+   * Fix for corrupt color-attr after some ACS-mode changes. (Pierre, Strassbourg
+      meeting)
+
+  Revision 1.10  2001/10/13 13:00:31  michael
   + Removed defaultmode field from driver
 
   Revision 1.9  2001/10/06 22:28:25  michael