diff -r 2e7c91b6773a -r 43f96cd0eee1 SmallSense__SmalltalkQuickFixer.st --- a/SmallSense__SmalltalkQuickFixer.st Tue Sep 01 18:58:19 2015 +0200 +++ b/SmallSense__SmalltalkQuickFixer.st Thu Sep 03 11:45:34 2015 +0200 @@ -1,3 +1,5 @@ +"{ Encoding: utf8 }" + " stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE Copyright (C) 2013-2014 Jan Vrany @@ -128,13 +130,18 @@ 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. + view + undoableDo:[ + line := view firstLineShown. + view replaceContentsWith:newSource asStringCollection. +"/ view contents: newSource asStringCollection clear: false. + view modified: true. + view isCodeView2 ifTrue: [ + view reallyModifiedChannel value: true. + ]. + view scrollToLine:line. + ] + info:'Rewrite the code'. ]. ] ifFalse: [ | browser |