class: DiffTextView
authorClaus Gittinger <cg@exept.de>
Thu, 11 Dec 2014 21:49:11 +0100
changeset 15014 57e3d245860c
parent 15013 5fd01b1235b7
child 15015 50d3b7bb3fbd
class: DiffTextView changed: #text1:text2: shortcut diff if the two texts are the same
DiffTextView.st
--- a/DiffTextView.st	Thu Dec 11 21:48:46 2014 +0100
+++ b/DiffTextView.st	Thu Dec 11 21:49:11 2014 +0100
@@ -193,9 +193,11 @@
 
     text1 := t1 asStringCollection.
     text2 := t2 asStringCollection.
-
-    diffList := self diffListFor:text1 and:text2.
-
+    text1 = text2 ifTrue:[
+        diffList := #()
+    ] ifFalse:[
+        diffList := self diffListFor:text1 and:text2.
+    ].
     self updateListsFrom:text1 and:text2 diffs:diffList
 
     "
@@ -675,10 +677,10 @@
 !DiffTextView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/DiffTextView.st,v 1.65 2014-12-03 21:11:32 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DiffTextView.st,v 1.66 2014-12-11 20:49:11 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/DiffTextView.st,v 1.65 2014-12-03 21:11:32 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DiffTextView.st,v 1.66 2014-12-11 20:49:11 cg Exp $'
 ! !