Method.st
changeset 12620 5c18bf31424d
parent 12607 50203f172ed8
child 12682 e9836c3c4737
--- a/Method.st	Tue Dec 15 15:18:45 2009 +0100
+++ b/Method.st	Tue Dec 15 15:31:24 2009 +0100
@@ -548,6 +548,12 @@
     "Cache the source of recently used methods"
     
     chunk notNil ifTrue:[
+        UserPreferences current keepMethodSourceCode ifTrue:[
+            source := chunk.
+            sourcePosition := nil.
+            ^ source.
+        ].
+
         CacheDictionary notNil ifTrue:[
             self class lastMethodSourcesLock critical:[
                 LastMethodSources isNil ifTrue:[
@@ -555,7 +561,7 @@
                 ].
                 LastMethodSources at:self put:chunk.
             ]
-        ]
+        ].
     ].
 
     ^ chunk
@@ -2926,11 +2932,11 @@
 !Method class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.343 2009-12-11 16:50:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.344 2009-12-15 14:31:24 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.343 2009-12-11 16:50:30 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Method.st,v 1.344 2009-12-15 14:31:24 cg Exp $'
 ! !
 
 Method initialize!