care for emphasis when replacing.
authorClaus Gittinger <cg@exept.de>
Sat, 20 Jun 1998 20:26:24 +0200
changeset 1599 63636b356b1f
parent 1598 c9f30d02ad4f
child 1600 bc8ba748da8a
care for emphasis when replacing.
ETxtView.st
EditTextView.st
--- a/ETxtView.st	Sat Jun 20 20:25:06 1998 +0200
+++ b/ETxtView.st	Sat Jun 20 20:26:24 1998 +0200
@@ -2585,10 +2585,19 @@
         newLine := aString species new:endCol.
     ] ifFalse: [
         (endCol > lineSize) ifTrue: [
-            newLine := line species new:endCol.
+            aString isText ifTrue:[
+                newLine := aString species new:endCol.
+            ] ifFalse:[
+                newLine := line species new:endCol.
+            ].
             newLine replaceFrom:1 to:lineSize with:line startingAt:1.
         ] ifFalse: [
-            newLine := line copy.
+            aString isText ifTrue:[
+                newLine := aString species new:line size.
+                newLine replaceFrom:1 to:lineSize with:line startingAt:1.
+            ] ifFalse:[
+                newLine := line copy.
+            ]
         ]
     ].
     newLine replaceFrom:colNr with:aString.
@@ -2605,7 +2614,7 @@
     ]
 
     "Created: / 11.6.1998 / 10:38:32 / cg"
-    "Modified: / 12.6.1998 / 22:06:11 / cg"
+    "Modified: / 20.6.1998 / 20:23:50 / cg"
 !
 
 splitLine:lineNr before:colNr
@@ -4440,5 +4449,5 @@
 !EditTextView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/Attic/ETxtView.st,v 1.177 1998-06-20 17:42:23 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/Attic/ETxtView.st,v 1.178 1998-06-20 18:26:24 cg Exp $'
 ! !
--- a/EditTextView.st	Sat Jun 20 20:25:06 1998 +0200
+++ b/EditTextView.st	Sat Jun 20 20:26:24 1998 +0200
@@ -2585,10 +2585,19 @@
         newLine := aString species new:endCol.
     ] ifFalse: [
         (endCol > lineSize) ifTrue: [
-            newLine := line species new:endCol.
+            aString isText ifTrue:[
+                newLine := aString species new:endCol.
+            ] ifFalse:[
+                newLine := line species new:endCol.
+            ].
             newLine replaceFrom:1 to:lineSize with:line startingAt:1.
         ] ifFalse: [
-            newLine := line copy.
+            aString isText ifTrue:[
+                newLine := aString species new:line size.
+                newLine replaceFrom:1 to:lineSize with:line startingAt:1.
+            ] ifFalse:[
+                newLine := line copy.
+            ]
         ]
     ].
     newLine replaceFrom:colNr with:aString.
@@ -2605,7 +2614,7 @@
     ]
 
     "Created: / 11.6.1998 / 10:38:32 / cg"
-    "Modified: / 12.6.1998 / 22:06:11 / cg"
+    "Modified: / 20.6.1998 / 20:23:50 / cg"
 !
 
 splitLine:lineNr before:colNr
@@ -4440,5 +4449,5 @@
 !EditTextView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.177 1998-06-20 17:42:23 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.178 1998-06-20 18:26:24 cg Exp $'
 ! !