Bug 365454

Summary: Incorrect auto-indenting behavior if curly brace used on inner if/for/etc but not used on outer if/for/etc
Product: [Mono] MonoDevelop Reporter: Sandy Armstrong <sanfordarmstrong>
Component: C# BindingAssignee: Michael Hutchinson <mhutchinson>
Status: RESOLVED DUPLICATE QA Contact: MD Bugs <monodevelop-bugs>
Severity: Normal    
Priority: P5 - None    
Version: SVN   
Target Milestone: ---   
Hardware: Other   
OS: openSUSE 10.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Sandy Armstrong 2008-02-28 01:17:58 UTC
Using the managed edtior in SVN trunk...

If I type:

if (true)
    if (true) {

I would expect that hitting Enter after the curly brace would auto-indent the next line an additional level, like this:

if (true)
    if (true) {
        | // cursor is indented

However, what I actually see is this:

if (true)
    if (true) {
    | // cursor should be indented one more level

Both of these scenarios behave correctly, though:

if (true)
    if (true)

if (true) {
    if (true) {
Comment 1 Michael Hutchinson 2008-05-19 15:13:50 UTC

*** This bug has been marked as a duplicate of bug 325187 ***