DiffTextView.st
changeset 318 2a2009875ee4
parent 313 c143d37be2e9
child 507 90ed76da5ade
--- a/DiffTextView.st	Fri Dec 22 23:33:04 1995 +0100
+++ b/DiffTextView.st	Sat Dec 23 01:30:28 1995 +0100
@@ -173,7 +173,7 @@
      update my views contents"
 
     |idx1 idx2 dIdx dEnd state s nr1 nr2 nr3 op entry c l1 l2 any delta
-     textView1 textView2|
+     textView1 textView2 s1 s2|
 
     textView1 := textViews at:1.
     textView2 := textViews at:2.
@@ -306,7 +306,8 @@
                 (entry at:1) == $< ifTrue:[
                     useColors ifTrue:[
                         (l2 size >= idx1
-                        and:[(l2 at:idx1) asString withoutSeparators = (text1 at:idx1) withoutSeparators]) ifTrue:[
+                        and:[(s2 := l2 at:idx1) notNil
+                             and:[s2 asString withoutSeparators = (text1 at:idx1) withoutSeparators]]) ifTrue:[
                             l1 add:(ColoredListEntry string:(text1 at:idx1) foregroundColor:changedSpacesOnlyColor backgroundColor:changedSpacesOnlyBgColor).
                             l2 at:idx1 put:(ColoredListEntry string:(l2 at:idx1) asString foregroundColor:changedSpacesOnlyColor backgroundColor:changedSpacesOnlyBgColor).
                         ] ifFalse:[
@@ -320,7 +321,8 @@
                     (entry at:1) == $> ifTrue:[
                         useColors ifTrue:[
                             (l1 size >= idx2
-                            and:[(l1 at:idx2) asString withoutSeparators = (text2 at:idx2) withoutSeparators]) ifTrue:[
+                            and:[(s1 := l1 at:idx2) notNil
+                                and:[s1 asString withoutSeparators = (text2 at:idx2) withoutSeparators]]) ifTrue:[
                                 l2 add:(ColoredListEntry string:(text2 at:idx2) foregroundColor:changedSpacesOnlyColor backgroundColor:changedSpacesOnlyBgColor).
                                 l1 at:idx2 put:(ColoredListEntry string:(l1 at:idx2) asString foregroundColor:changedSpacesOnlyColor backgroundColor:changedSpacesOnlyBgColor).
                             ] ifFalse:[
@@ -382,10 +384,10 @@
     textView1 list:l1.
     textView2 list:l2
 
-    "Modified: 20.11.1995 / 13:18:06 / cg"
+    "Modified: 23.12.1995 / 01:30:01 / cg"
 ! !
 
 !DiffTextView class methodsFor:'documentation'!
 
 version
-^ '$Header: /cvs/stx/stx/libtool/DiffTextView.st,v 1.14 1995-12-20 14:32:54 cg Exp $'! !
+^ '$Header: /cvs/stx/stx/libtool/DiffTextView.st,v 1.15 1995-12-23 00:30:28 cg Exp $'! !