diff --git a/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs b/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs index 0e884002ca..e2f410ad7d 100644 --- a/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs +++ b/ICSharpCode.NRefactory.CSharp/Formatter/AstFormattingVisitor.cs @@ -129,12 +129,12 @@ namespace ICSharpCode.NRefactory.CSharp /// public void ApplyChanges() { - ApplyChanges(0, document.TextLength, document.Replace, (o, l, v) => document.GetText(o, l) != v); + ApplyChanges(0, document.TextLength, document.Replace, (o, l, v) => document.GetText(o, l) == v); } public void ApplyChanges(int startOffset, int length) { - ApplyChanges(startOffset, length, document.Replace, (o, l, v) => document.GetText(o, l) != v); + ApplyChanges(startOffset, length, document.Replace, (o, l, v) => document.GetText(o, l) == v); } ///