ListView.st
branchjv
changeset 6024 7fdee3dcd61a
parent 5986 1fa5f049f917
parent 6019 a801624144ea
child 6085 4ecbe3a93aec
--- a/ListView.st	Mon Dec 26 10:26:48 2016 +0000
+++ b/ListView.st	Thu Jan 05 21:05:44 2017 +0000
@@ -1543,29 +1543,29 @@
     endLine isNil ifTrue:[^ nil].
 
     (startLine == endLine) ifTrue:[
-	"part of a line"
-	^ StringCollection with:(self listAt:startLine from:startCol to:endCol)
+        "part of a line"
+        ^ StringCollection with:(self listAt:startLine from:startCol to:endCol)
     ].
 
     sz := endLine - startLine + 1.
-    sz < 1 ifTrue:[^ ''].
+    sz < 1 ifTrue:[^ StringCollection new].
 
     text := StringCollection new:sz.
 
     "get 1st and last (possibly) partial lines"
     text at:1 put:(self listAt:startLine from:startCol).
     endCol == 0 ifTrue:[
-	last := ''
+        last := ''
     ] ifFalse:[
-	last := self listAt:endLine to:endCol.
+        last := self listAt:endLine to:endCol.
     ].
     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 at:index put:(self listAt:lineNr).
+        index := index + 1
     ].
     ^ text