|
Bugzilla – Full Text Bug Listing |
| Summary: | Incorrectly indented switch/case when inside if(), while(), ... | ||
|---|---|---|---|
| Product: | [Mono] MonoDevelop | Reporter: | Jan Oravec <jan.oravec> |
| Component: | C# Binding | Assignee: | Mike Krueger <mkrueger> |
| Status: | RESOLVED DUPLICATE | QA Contact: | MD Bugs <monodevelop-bugs> |
| Severity: | Minor | ||
| Priority: | P5 - None | ||
| Version: | SVN | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
as a temporary workaround, just add braces to the if-statement as well:
if (true)
{
...
}
that should make the smart indenter work again (it gets confused with some situations)
Mike, can you take care of this? I'll mark it as a dupe. I wanted to throw old the old smart indenter & replace with the new one. Unfortunately it's not ready yet (need the new parser infrastructure with exact token positions). In the mean time we've some issues with this - basically for indenting constructs we need an indenter based on a full c# parser - all other 'tricks' for indenting c# code won't be successful. *** This bug has been marked as a duplicate of bug 325187 *** |
I am using 'Indent case labels' and 'Place goto labels one indent less than current' options. The following code indents wrongly: if (true) switch ("foo") { case "foo": Console.WriteLine (); } I would expect case body to be indented to the right, as it is when if() is removed.