EditTextView.st
changeset 2121 a408dd807d99
parent 2119 2aa585fc62a3
child 2129 989228af033d
--- a/EditTextView.st	Mon Feb 07 20:25:55 2000 +0100
+++ b/EditTextView.st	Tue Feb 08 17:51:27 2000 +0100
@@ -3756,45 +3756,46 @@
     |line col history sel s|
 
     (self checkModificationsAllowed) ifFalse:[
-	self flash.
-	^ self
+        self flash.
+        ^ self
     ].
 
     sel := self selection.
     sel notNil ifTrue:[
-	lastString := s := sel asStringWithCRs.
-	line := selectionStartLine.
-	col := selectionStartCol.
-	undoAction := [ self cursorLine:line col:col.
-			self insertLines:(Array with:s) withCR:false.
-		      ].
-
-	"
-	 remember in CopyBuffer
-	"
-	self setTextSelection:lastString.
-
-	"
-	 append to DeleteHistory (if there is one)
-	"
-	history := Smalltalk at:#DeleteHistory.
-	history notNil ifTrue:[
-	    history addAll:(lastString asStringCollection).
-	    history size > 1000 ifTrue:[
-		history := history copyFrom:(history size - 1000)
-	    ].
-	].
-
-	"
-	 now, delete it
-	"
-	self deleteSelection.
-	lastReplacement := nil
+        lastString := s := sel asStringWithCRs.
+        line := selectionStartLine.
+        col := selectionStartCol.
+        undoAction := [ 
+                        self cursorLine:line col:col.
+                        self paste:sel "/ (Array with:s) withCR:false.
+                      ].
+
+        "
+         remember in CopyBuffer
+        "
+        self setTextSelection:sel. "/ lastString.
+
+        "
+         append to DeleteHistory (if there is one)
+        "
+        history := Smalltalk at:#DeleteHistory.
+        history notNil ifTrue:[
+            history addAll:(sel asStringCollection).
+            history size > 1000 ifTrue:[
+                history := history copyFrom:(history size - 1000)
+            ].
+        ].
+
+        "
+         now, delete it
+        "
+        self deleteSelection.
+        lastReplacement := nil
     ] ifFalse:[
-	"
-	 a cut without selection will search&cut again
-	"
-	self again
+        "
+         a cut without selection will search&cut again
+        "
+        self again
     ]
 
     "Modified: / 5.4.1998 / 16:51:53 / cg"
@@ -4740,5 +4741,5 @@
 !EditTextView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.226 2000-02-07 11:23:37 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.227 2000-02-08 16:51:27 cg Exp $'
 ! !