TextView.st
changeset 2158 1fbe3297506f
parent 2120 1054ce5c8fe7
child 2191 373219bb2e9e
--- a/TextView.st	Wed Feb 23 11:27:45 2000 +0100
+++ b/TextView.st	Wed Feb 23 11:29:02 2000 +0100
@@ -2884,39 +2884,10 @@
      If the selection ends in a full line, the last entry in the returned
      collection will be an empty string."
 
-    |text sz index last
-     startLine "{ Class: SmallInteger }"
-     endLine   "{ Class: SmallInteger }"|
-
     selectionStartLine isNil ifTrue:[^ nil].
-    startLine := selectionStartLine.
-    endLine := selectionEndLine.
-
-    (startLine == endLine) ifTrue:[
-	"part of a line"
-	^ StringCollection with:(self listAt:startLine
-					from:selectionStartCol
-					  to:selectionEndCol)
-    ].
-    sz := endLine - startLine + 1.
-    text := StringCollection new:sz.
-
-    "get 1st and last (possibly) partial lines"
-    text at:1 put:(self listAt:startLine from:selectionStartCol).
-    selectionEndCol == 0 ifTrue:[
-	last := ''
-    ] ifFalse:[
-	last := self listAt:selectionEndLine to:selectionEndCol.
-    ].
-    text at:sz put:last.
-
-    "get bulk of text"
-    index := 2.
-    (startLine + 1) to:(endLine - 1) do:[:lineNr |
-	text at:index put:(self listAt:lineNr).
-	index := index + 1
-    ].
-    ^ text
+    ^ self textFromLine:selectionStartLine col:selectionStartCol toLine:selectionEndLine col:selectionEndCol
+
+    "Modified: / 22.2.2000 / 23:54:54 / cg"
 !
 
 selectionEndCol
@@ -2998,5 +2969,5 @@
 !TextView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.151 2000-02-07 19:25:55 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/TextView.st,v 1.152 2000-02-23 10:28:38 cg Exp $'
 ! !