Browse Source

* From Jakob Klos:
* assign takes care of DefaultTextLineBreakStyle when determing the line ending style, fixes 4164

git-svn-id: trunk@610 -

florian 20 years ago
parent
commit
0508459315
1 changed files with 5 additions and 1 deletions
  1. 5 1
      rtl/inc/text.inc

+ 5 - 1
rtl/inc/text.inc

@@ -81,7 +81,11 @@ Begin
   TextRec(t).BufSize:=TextRecBufSize;
   TextRec(t).Bufptr:=@TextRec(t).Buffer;
   TextRec(t).OpenFunc:=@FileOpenFunc;
-  TextRec(t).LineEnd:=LineEnding;
+  Case DefaultTextLineBreakStyle Of
+    tlbsLF: TextRec(t).LineEnd := #10;
+    tlbsCRLF: TextRec(t).LineEnd := #13#10;
+    tlbsCR: TextRec(t).LineEnd := #13;
+  End;  
   Move(s[1],TextRec(t).Name,Length(s));
 End;