BrowserView.st
changeset 857 fd1c26c79d18
parent 856 45d8adb56f96
child 858 8610070bdbd2
--- a/BrowserView.st	Sat Nov 09 20:00:30 1996 +0100
+++ b/BrowserView.st	Sun Nov 10 18:16:24 1996 +0100
@@ -7105,7 +7105,7 @@
      its not ok, if code has been changed.
      in this case, return the result of a user query"
 
-    |what m src v|
+    |what m src1 src2 v|
 
     codeView modified ifFalse:[
         ^ true
@@ -7115,21 +7115,25 @@
         self withWaitCursorDo:[
             m := actualClass compiledMethodAt:currentSelector.
             m notNil ifTrue:[
-                (src := m source) = codeView contents ifFalse:[
-                    what := self checkSelectionChangeAllowedWithCompare:true.
-                    what == #compare ifTrue:[
-                        v := DiffTextView 
-                                openOn:codeView contents 
-                                label:(resources string:'code here (to be accepted ?)')
-                                and:src 
-                                label:(resources string:'methods actual code').
-                        v label:(resources string:'comparing method versions').
-                        ^ false
+                (src1 := m source) = (src2 := codeView contents) ifFalse:[
+                    (src1 asCollectionOfLines collect:[:line | line withoutTrailingSeparators])
+                    =
+                    (src2 asCollectionOfLines collect:[:line | line withoutTrailingSeparators])
+                    ifFalse:[
+                        what := self checkSelectionChangeAllowedWithCompare:true.
+                        what == #compare ifTrue:[
+                            v := DiffTextView 
+                                    openOn:src2 
+                                    label:(resources string:'code here (to be accepted ?)')
+                                    and:src1 
+                                    label:(resources string:'methods actual code').
+                            v label:(resources string:'comparing method versions').
+                            ^ false
+                        ].
+                        ^ what
                     ].
-                    ^ what
-                ] ifTrue:[
-                    ^ true
-                ]
+                ].
+                ^ true
             ]
         ]
     ].
@@ -7137,7 +7141,7 @@
     ^ self checkSelectionChangeAllowedWithCompare:false
 
     "Created: 24.11.1995 / 11:03:33 / cg"
-    "Modified: 1.11.1996 / 12:25:20 / cg"
+    "Modified: 10.11.1996 / 18:14:31 / cg"
 !
 
 checkSelectionChangeAllowedWithCompare:compareOffered
@@ -8431,6 +8435,6 @@
 !BrowserView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.213 1996-11-09 19:00:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.214 1996-11-10 17:16:24 cg Exp $'
 ! !
 BrowserView initialize!