Specifically, it seems to affect regular
for loops (not the new “ranged” ones).
After I have typed the line with the
for and hit “return” to go to the new line below it, it does this
for (int i = 0; i < 10; ++i) | //< caret ends there when I hit return
Xcode 12 seems to believe that the following line should be at the same level of the
The problem is not just while typing, because with the option to reformat the code when copy/pasting, it messes up the indentation if there are such one-line
fors in the pasted code.
And also, even if you type the extra “tab” key to indent the line correctly while you’re at it, then when you type the semicolon at the end of the line, it gets auto-indented (incorrectly) at the same level of the for.
Xcode 12 users, can you confirm it’s behaving like that for you too, or is it mine that possibly has configuration issues?
(Xcode 11, which I still have, behaves as expected though)