Browse Source

Fixed indentation problem introduced in revision 1926

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1928 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
60481970fb
  1. 6
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/Indentation.cs

6
src/AddIns/BackendBindings/CSharpBinding/Project/Src/FormattingStrategy/Indentation.cs

@ -217,7 +217,9 @@ namespace CSharpBinding.FormattingStrategy
block.StartLine = doc.LineNumber; block.StartLine = doc.LineNumber;
if (block.LastWord == "switch") { if (block.LastWord == "switch") {
block.Indent(set, set.IndentString + set.IndentString); block.Indent(set, set.IndentString + set.IndentString);
} else if (oldBlock.OneLineBlock) { /* oldBlock refers to the previous line, not the previous block
* The block we want is not available anymore because it was never pushed.
* } else if (oldBlock.OneLineBlock) {
// Inside a one-line-block is another statement // Inside a one-line-block is another statement
// with a full block: indent the inner full block // with a full block: indent the inner full block
// by one additional level // by one additional level
@ -226,7 +228,7 @@ namespace CSharpBinding.FormattingStrategy
// Indent current line if it starts with the '{' character // Indent current line if it starts with the '{' character
if (i == 0) { if (i == 0) {
oldBlock.InnerIndent += set.IndentString; oldBlock.InnerIndent += set.IndentString;
} }*/
} else { } else {
block.Indent(set); block.Indent(set);
} }

Loading…
Cancel
Save