The indentation behaviour of Visual Studio 2022 version 17.4 has changed.
Has anyone figured out how to make it behave like it did in 17.3?
I have this typed:
Then I hit [enter], and I get
The cursor is now indented, as opposed to being under the ‘f’ like it used to in previous builds.
If the statement "foo" was a valid statement, then the cursor does not get indented.
Obviously, I could just write perfect code from top to bottom without ever typing an incomplete statement, but I’m just not that good :-/
2
Answers
It’s worse than that. The option Text Editor->All languages->Tabs->Indenting (or Text Editor->any language->Tabs->Indenting for that matter), which is a radio between None, Block and Smart, is completely botched – in 17.4, no matter what you set there, you get the "smart" behavior. Way to go Micro%$#^.
Btw – upon seeing this, I made the mistake of my life – roll back Visual Studio to the previous version (using the Rollback button in the VS installer) – that fixed the Indenting behavior, but completely reset all of my Visual Studio settings, including colors, everything. Starting with a blank slate. Thank you, thank you, thank you MS.
After my testing, I reproduced your problem, this is a bug.
I suggest you post this to the dc forums and attach the relevant link to the question.