DiffTextView.st
changeset 2141 1758f387ebe7
parent 1440 6a68adba9c33
child 2240 eb2688b9cf45
--- a/DiffTextView.st	Wed May 05 16:21:19 1999 +0200
+++ b/DiffTextView.st	Wed May 05 16:31:06 1999 +0200
@@ -132,14 +132,20 @@
     tmpFile1 := Filename newTemporary.
     stream := tmpFile1 writeStream.
     text1 do:[:line |
-        stream nextPutAll:line; cr
+        line notNil ifTrue:[
+            stream nextPutAll:line.
+        ].
+        stream cr
     ].
     stream close.
 
     tmpFile2 := Filename newTemporary.
     stream := tmpFile2 writeStream.
     text2 do:[:line |
-        stream nextPutAll:line; cr
+        line notNil ifTrue:[
+            stream nextPutAll:line.
+        ].
+        stream cr
     ].
     stream close.
 
@@ -152,6 +158,9 @@
 
     stream := PipeStream readingFrom:diffCmd.
     stream isNil ifTrue:[
+        stream := PipeStream readingFrom:('support' , Filename separator asString , diffCmd).
+    ].
+    stream isNil ifTrue:[
         self error:'cannot execute diff'.
         text1 := text2 := nil.
     ] ifFalse:[
@@ -200,7 +209,7 @@
      v open
     "
 
-    "Modified: / 30.1.1998 / 12:12:13 / cg"
+    "Modified: / 5.5.1999 / 16:07:13 / cg"
 ! !
 
 !DiffTextView methodsFor:'initialization'!
@@ -385,7 +394,9 @@
                     useColors ifTrue:[
                         (l2 size >= idx1
                         and:[(s2 := l2 at:idx1) notNil
-                             and:[s2 asString withoutSeparators = (text1 at:idx1) withoutSeparators]]) ifTrue:[
+                        and:[(s2 asString withoutSeparators = (text1 at:idx1) withoutSeparators)
+                              "/ or:[(s2 asString withoutSeparators withTabsExpanded = (text1 at:idx1) withoutSeparators withTabsExpanded)]  
+                        ]]) ifTrue:[
                             l1 add:(Text string:(text1 at:idx1) 
                                          foregroundColor:changedSpacesOnlyColor
                                          backgroundColor:changedSpacesOnlyBgColor).
@@ -406,7 +417,9 @@
                         useColors ifTrue:[
                             (l1 size >= idx2
                             and:[(s1 := l1 at:idx2) notNil
-                                and:[s1 asString withoutSeparators = (text2 at:idx2) withoutSeparators]]) ifTrue:[
+                            and:[(s1 asString withoutSeparators = (text2 at:idx2) withoutSeparators)
+                                  "/ or:[(s1 asString withoutSeparators withTabsExpanded = (text2 at:idx2) withoutSeparators withTabsExpanded)]  
+                            ]]) ifTrue:[
                                 l2 add:(Text string:(text2 at:idx2) foregroundColor:changedSpacesOnlyColor backgroundColor:changedSpacesOnlyBgColor).
                                 l1 at:idx2 put:(Text string:(l1 at:idx2) asString foregroundColor:changedSpacesOnlyColor backgroundColor:changedSpacesOnlyBgColor).
                             ] ifFalse:[
@@ -468,10 +481,10 @@
     textView1 list:l1.
     textView2 list:l2
 
-    "Modified: 16.5.1996 / 12:38:49 / cg"
+    "Modified: / 5.5.1999 / 16:08:03 / cg"
 ! !
 
 !DiffTextView class methodsFor:'documentation'!
 
 version
-^ '$Header: /cvs/stx/stx/libtool/DiffTextView.st,v 1.22 1998-01-30 11:24:57 cg Exp $'! !
+^ '$Header: /cvs/stx/stx/libtool/DiffTextView.st,v 1.23 1999-05-05 14:31:06 cg Exp $'! !