SmallSense__SmalltalkQuickFixer.st
changeset 296 981a82217e4c
parent 252 feba6ee5c814
child 312 ce4e697a363c
--- a/SmallSense__SmalltalkQuickFixer.st	Thu Oct 16 01:11:33 2014 +0100
+++ b/SmallSense__SmalltalkQuickFixer.st	Thu Oct 16 03:06:52 2014 +0100
@@ -143,16 +143,22 @@
         ^ self
     ].
     (changes size == 1 and: [ changes anElement isMethodCodeChange ]) ifTrue: [
-        | oldSource  newSource |
+        "/ Only one change, modify the code directly in the editor
+
+        | oldSource newSource |
 
         oldSource := view contents asString string.
         newSource := changes anElement source asString.
         oldSource ~= newSource ifTrue: [
+            | line |
+
+            line := view firstLineShown.
             view contents: newSource asStringCollection clear: false.
             view modified: true.
             view isCodeView2 ifTrue: [
                 view reallyModifiedChannel value: true.
-            ]
+            ].
+            view scrollToLine:line.     
         ].
     ] ifFalse: [
         | browser |
@@ -167,7 +173,7 @@
     ]
 
     "Created: / 16-02-2012 / 14:46:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 19-09-2013 / 15:18:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 16-10-2014 / 03:05:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !SmalltalkQuickFixer::QuickFix methodsFor:'accessing'!