expand tabs in #replaceAll:...
authorClaus Gittinger <cg@exept.de>
Wed, 10 Jun 1998 18:51:13 +0200
changeset 1559 cecf77805bff
parent 1558 abf35cc39757
child 1560 43d0f7c2143f
expand tabs in #replaceAll:...
ETxtView.st
EditTextView.st
--- a/ETxtView.st	Wed Jun 10 18:43:59 1998 +0200
+++ b/ETxtView.st	Wed Jun 10 18:51:13 1998 +0200
@@ -2373,7 +2373,7 @@
             newLine := line species new:colNr.
             newLine replaceFrom:1 to:lineSize with:line startingAt:1.
         ] ifFalse: [
-            newLine := line.
+            newLine := line copy.
         ]
     ].
     newLine at:colNr put:aCharacter.
@@ -2395,7 +2395,7 @@
     ]
 
     "Created: / 6.3.1996 / 12:29:20 / cg"
-    "Modified: / 10.6.1998 / 16:49:54 / cg"
+    "Modified: / 10.6.1998 / 18:50:18 / cg"
 !
 
 replaceAll:aString atLine:lineNr col:colNr
@@ -2422,6 +2422,9 @@
         ]
     ].
     newLine replaceFrom:colNr with:aString.
+    (aString includes:(Character tab)) ifTrue:[
+        newLine := self withTabsExpanded:newLine.
+    ].
     list at:lineNr put:newLine.
     widthOfWidestLine notNil ifTrue:[
         widthOfWidestLine := widthOfWidestLine max:(self widthOfLineString:line).
@@ -2431,8 +2434,8 @@
         self redrawLine:lineNr col:colNr
     ]
 
-    "Modified: / 22.5.1996 / 15:35:22 / cg"
     "Created: / 9.6.1998 / 20:30:03 / cg"
+    "Modified: / 10.6.1998 / 18:49:27 / cg"
 !
 
 splitLine:lineNr before:colNr
@@ -4249,5 +4252,5 @@
 !EditTextView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Attic/ETxtView.st,v 1.160 1998-06-10 16:43:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Attic/ETxtView.st,v 1.161 1998-06-10 16:51:13 cg Exp $'
 ! !
--- a/EditTextView.st	Wed Jun 10 18:43:59 1998 +0200
+++ b/EditTextView.st	Wed Jun 10 18:51:13 1998 +0200
@@ -2373,7 +2373,7 @@
             newLine := line species new:colNr.
             newLine replaceFrom:1 to:lineSize with:line startingAt:1.
         ] ifFalse: [
-            newLine := line.
+            newLine := line copy.
         ]
     ].
     newLine at:colNr put:aCharacter.
@@ -2395,7 +2395,7 @@
     ]
 
     "Created: / 6.3.1996 / 12:29:20 / cg"
-    "Modified: / 10.6.1998 / 16:49:54 / cg"
+    "Modified: / 10.6.1998 / 18:50:18 / cg"
 !
 
 replaceAll:aString atLine:lineNr col:colNr
@@ -2422,6 +2422,9 @@
         ]
     ].
     newLine replaceFrom:colNr with:aString.
+    (aString includes:(Character tab)) ifTrue:[
+        newLine := self withTabsExpanded:newLine.
+    ].
     list at:lineNr put:newLine.
     widthOfWidestLine notNil ifTrue:[
         widthOfWidestLine := widthOfWidestLine max:(self widthOfLineString:line).
@@ -2431,8 +2434,8 @@
         self redrawLine:lineNr col:colNr
     ]
 
-    "Modified: / 22.5.1996 / 15:35:22 / cg"
     "Created: / 9.6.1998 / 20:30:03 / cg"
+    "Modified: / 10.6.1998 / 18:49:27 / cg"
 !
 
 splitLine:lineNr before:colNr
@@ -4249,5 +4252,5 @@
 !EditTextView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.160 1998-06-10 16:43:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.161 1998-06-10 16:51:13 cg Exp $'
 ! !