Tools__TextMergeInfo.st
branchjv
changeset 12288 2fa2855b6ba5
parent 12227 f82b3ed0726a
child 12307 d7a3df44366a
--- a/Tools__TextMergeInfo.st	Fri Sep 07 18:28:09 2012 +0100
+++ b/Tools__TextMergeInfo.st	Fri Sep 07 18:30:05 2012 +0100
@@ -71,9 +71,14 @@
 
 text
     ^String  streamContents:[:s|
-        1 to: list size do:[:i|
-            (listInfos at: i) offset ~~ -1 ifTrue:[
-                s nextPutLine: (list at: i)
+        list withIndexDo:[:ln :i|
+            | info |
+
+            info := listInfos at: i ifAbsent:[nil].
+            (info isNil or:[info offset ~~ -1]) ifTrue:[
+                ln notNil ifTrue:[
+                    s nextPutLine: (list at: i)
+                ].
             ]
         ].
     ].
@@ -169,7 +174,7 @@
      using textA."
 
     | listA offset |
-    listA := textA asStringCollection.
+    listA := (textA ? '') asStringCollection.
     offset := 0.
     interval do:[:lineNr|
         | info chunk line |
@@ -209,7 +214,7 @@
      using textA."
 
     | listA offset |
-    listA := textA asStringCollection.
+    listA := (textA ? #()) asStringCollection.
     offset := 0.
     interval do:[:lineNr|
         | info chunk line |
@@ -441,5 +446,5 @@
 !TextMergeInfo class methodsFor:'documentation'!
 
 version_SVN
-    ^ '$Id: Tools__TextMergeInfo.st 7975 2012-04-09 18:34:24Z vranyj1 $'
+    ^ '$Id: Tools__TextMergeInfo.st 8049 2012-09-07 17:30:05Z vranyj1 $'
 ! !