TextView.st
changeset 2000 efdedcb4ee33
parent 1987 599825bed176
child 2024 3858c39a7eda
--- a/TextView.st	Mon Aug 23 13:00:10 1999 +0200
+++ b/TextView.st	Wed Aug 25 18:07:44 1999 +0200
@@ -1519,33 +1519,35 @@
     |startNr nLines string|
 
     aStream isFileStream ifTrue:[
-	"on some systems, writing linewise is very slow (via NFS)
-	 therefore we convert to a string and write it in big chunks.
-	 To avoid creating huge strings, we do it in blocks of 1000 lines,
-	 limiting temporary string creation to about 50-80k.
-	"
-	startNr := 1.
-	nLines := list size.
-	[startNr <= nLines] whileTrue:[
-	    string := list asStringWithCRsFrom:startNr 
-					    to:((startNr + 1000) min:nLines)
-				  compressTabs:compressTabs.
-	    encodingSymOrNil notNil ifTrue:[
-		string := string encodeInto:encodingSymOrNil
-	    ].
-	    aStream nextPutAll:string.
-	    startNr := startNr + 1000 + 1.
-	].
+        "on some systems, writing linewise is very slow (via NFS)
+         therefore we convert to a string and write it in big chunks.
+         To avoid creating huge strings, we do it in blocks of 1000 lines,
+         limiting temporary string creation to about 50-80k.
+        "
+        startNr := 1.
+        nLines := list size.
+        [startNr <= nLines] whileTrue:[
+            string := list asStringWithCRsFrom:startNr 
+                                            to:((startNr + 1000) min:nLines)
+                                  compressTabs:compressTabs.
+            encodingSymOrNil notNil ifTrue:[
+                string := string encodeInto:encodingSymOrNil
+            ].
+            aStream nextPutAll:string.
+            startNr := startNr + 1000 + 1.
+        ].
     ] ifFalse:[
-	list do:[:aLine |
-	    aLine notNil ifTrue:[
-		encodingSymOrNil notNil ifTrue:[
-		    aStream nextPutLine:(aLine encodeInto:encodingSymOrNil)
-		] ifFalse:[
-		    aStream nextPutLine:aLine.
-		]
-	    ].
-	]
+        list do:[:aLine |
+            aLine notNil ifTrue:[
+                encodingSymOrNil notNil ifTrue:[
+                    aStream nextPutLine:(aLine encodeInto:encodingSymOrNil)
+                ] ifFalse:[
+                    aStream nextPutLine:aLine.
+                ]
+            ] ifFalse:[
+                aStream cr.
+            ]
+        ]
     ]
 
     "Modified: 8.6.1996 / 11:50:46 / cg"
@@ -2953,5 +2955,5 @@
 !TextView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.140 1999-08-18 14:31:38 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.141 1999-08-25 16:07:44 cg Exp $'
 ! !