I'm fixing up somebody else's old code. I encountered an odd scenario which I was able to narrow down using this example:
printf("Maximum of 0 and 6: %d\n", std::max(0, 6); // required closing parenthesis is missing
In Settings - Preferences - Edit, if the value "Smart brackets / parentheses" is checked, then if the cursor is between the '6' and ')' inside std::max(), and I type a right parenthesis, the editor will ignore that keystroke and simply move the cursor to the right. If instead the cursor is between the ')' and ';' , the editor will insert that character. Took me awhile to isolate why this was happening.
On the Preferences page, for the "Smart brackets / parentheses" option, the help text says: "When typing ']' or ')' next to a ']' or ')' Move the caret one position to the right". So perhaps this is the desired behavior, but for me at least this behavior was unexpected. Could the editor insert the character, AND move the caret one position to the right? Replacing a purposely typed character with caret movement doesn't seem like the right thing to do. I've unchecked this option, and now the editor is more predictable.
Thanks.