Hi,
I have this piece of code:
if(IsWindow(m_hWnd))
::GetWindowRect (m_hWnd ,&LRRectW);
And I wanted to put braces on the dependent clause, so I highlighted the call to GetWindowRect() and typed the '{' character, which put braces around it:
if(IsWindow(m_hWnd))
{::GetWindowRect (m_hWnd ,&LRRectW);}
So far, so good, although I'd prefer to put newlines after the first brace and before the second, but I bet I can fix that. But that's not hte hug.
If I then insert those newlines manually, I get this:
if(IsWindow(m_hWnd))
{
::GetWindowRect (m_hWnd ,&LRRectW);
}
(Note that I have the IDE's editor option to auto-indent upon tab anywhere on the line.) If I place my cursor just to the right of the open brace and hit Tab, I get this:
if(IsWindow(m_hWnd))
{
} // <-- this is one more brace than I bargained for.
::GetWindowRect (m_hWnd ,&LRRectW);
}
However, if I have the cursor to the left, it auto-indents without VA X inserting a new brace. Which, as workarounds go isn't a tough one.
I can recreate this issue with a fresh snippet, so the first couple of steps can be skipped:
if (true)
{
return;
}
Is this expected, i.e. does VA X check for matching close braces before auto-adding one?
Thanks again,
Jay