Did something change in Xcode 9 regarding the “automatically insert closing braces” preference? My checkbox for that option has been set for a long time. After I installed Xcode 9 (now at 9.0.1) the behavior changed in an unexpected way. If I am at “top level” — at the left margin, not inside a brace body — and I type an open brace:
void foo()
{<cursor_here>
then a return, I see:
void foo()
{
<cursor_here>
}
which is what I expect. But if I am inside a brace body, I do not see the automatic insertion of the close brace:
void foo(bool b)
{
if (b)
{<cursor_here>
}
After a return I see:
void foo(bool b)
{
if (b)
{
<cursor_here>
}
with no automatically inserted close brace. While trying this, I noticed that the close brace IS inserted if the open brace is not on its own line:
void foo(bool b)
{
if (b) {<cursor_here>
}
After typing return:
void foo(bool b)
{
if (b) {
<cursor_here>
}
}
Is there a way to get the pre-Xcode-9 behavior back?