diff options
author | Mike Krüger <mkrueger@novell.com> | 2011-02-08 13:41:57 +0300 |
---|---|---|
committer | Mike Krüger <mkrueger@novell.com> | 2011-02-09 13:13:07 +0300 |
commit | 0e820cfb369f1de7a2c9bc149c16c135327307e0 (patch) | |
tree | 481f38714147e03c4096ecc1be5445b24a12bf2d /main/src | |
parent | ddae19b75436455641d9ec9e50278c0f70c0a90e (diff) |
Fixed 'Bug 669819 - Brace for lambda should not indent'.
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpIndentEngine.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpIndentEngine.cs b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpIndentEngine.cs index c332d21840..8e4127e595 100644 --- a/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpIndentEngine.cs +++ b/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/CSharpIndentEngine.cs @@ -688,6 +688,8 @@ namespace MonoDevelop.CSharp.Formatting } } else { stack.Push (Inside.Block, keyword, curLineNr, 0); + if (inside == Inside.ParenList) + TrimIndent (); } keyword = String.Empty; @@ -720,7 +722,13 @@ namespace MonoDevelop.CSharp.Formatting inside = stack.PeekInside (1); stack.Pop (); } - + + if (inside == Inside.ParenList) { + curIndent = stack.PeekIndent (0); + keyword = stack.PeekKeyword (0); + inside = stack.PeekInside (0); + } + // pop this block off the stack keyword = stack.PeekKeyword (0); if (keyword != "case" && keyword != "default") |