White space removal in Xcode breaks automatic indenting
| Originator: | shannoncornish | ||
| Number: | rdar://11845911 | Date Originated: | |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 4.5 DP2 |
| Classification: | Other Bug | Reproducible: | Always |
Summary:
White space removal in Xcode breaks automatic indenting.
Steps to Reproduce:
Turn on automatic indenting (I have both options turned on)
Turn on indenting (I have the default settings)
Create a new file in Xcode (I'll be using an Objective-C file in the example)
Type the following
- (void)doSomething
{<leave text cursor here>
Press enter to start a new line
Expected Results:
- (void)doSomething
{
<text cursor>
The text cursor should be indented as per my settings.
Actual Results:
- (void)doSomething
{
<text cursor>
The text cursor is now at the start of the line with no whitespace.
Regression:
Notes:
This is jarring to the development experience as now none of my code is indented as I type (it gets indented when I complete the line with a semi colon and return).
In order of preference, line indenting should take precedence over white space removal.
Perhaps white space removal should only occur on file save?
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!