Skip to content

Formatting incorrectly indents previous line in nested lambda scenario #5693

@NTaylorMullen

Description

@NTaylorMullen

Note: This call path originates from OnAutoInsert where C# is instructing us to indent the curly braces differently. We then apply on-type-formatting mechanics ontop of the typed content in order to format it. However, in this case we format it incorrectly.

Starting text:

    public RenderFragment RenderFoo()
    {
        return (__builder) =>
        {
            @if (true){}
        };
    }

Ywtmd4gJ9i

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions