Browse Source

Fixed formatting bug.

pull/32/merge
Mike Krüger 12 years ago
parent
commit
a0681b1a0b
  1. 2
      ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor.cs
  2. 1
      ICSharpCode.NRefactory.Tests/FormattingTests/TestTypeLevelIndentation.cs

2
ICSharpCode.NRefactory.CSharp/Formatter/FormattingVisitor.cs

@ -149,6 +149,8 @@ namespace ICSharpCode.NRefactory.CSharp @@ -149,6 +149,8 @@ namespace ICSharpCode.NRefactory.CSharp
do {
line--;
} while (line > 0 && IsSpacing(document.GetLineByNumber(line)));
if (line > 0 && !IsSpacing(document.GetLineByNumber(line)))
line++;
int end = document.GetOffset(loc.Line, 1);
int start = document.GetOffset(line + 1, 1);
var sb = new StringBuilder ();

1
ICSharpCode.NRefactory.Tests/FormattingTests/TestTypeLevelIndentation.cs

@ -51,7 +51,6 @@ namespace ICSharpCode.NRefactory.CSharp.FormattingTests @@ -51,7 +51,6 @@ namespace ICSharpCode.NRefactory.CSharp.FormattingTests
Test(policy, @"// THE SOFTWARE.
using Foo ;", @"// THE SOFTWARE.
using Foo;");
}

Loading…
Cancel
Save