User forums > Using Code::Blocks

Smart indent indents twice after opening curly brace of if statement

(1/1)

UberNewb:
Since upgrading from CB 12.11 from 8.05 I have noticed that smart indent does not work the same as it used to.

(assuming indent level of 3 spaces)
Previous behaviour (pressing enter after the opening curly brace of an if statement leaves the pipe one indentation level greater than before) :

--- Code: ---if (1) {
   |

--- End code ---

Current behaviour (pressing enter after the opening curly brace indents two levels) :

--- Code: ---if (1) {
      |

--- End code ---

Is this a bug, or a setting I need to fix?

oBFusCATed:
Bug.

UberNewb:
I can confirm the behaviour is still there in the latest nightly, 9158 from June 16, 2013

Jenna:
Can you cplease test whether it works correctly, if you delete the indendation with backspaces until the cursor is directly after the brace and press enter ?
In this case the double-indendation does not happen here.
This should not be a workaround, but a hint for (an)other dev(s) to find the issue.

UberNewb:
Yes, oddly enough backspacing back to the curly brace and pressing enter again only indents one level...

Navigation

[0] Message Index

Go to full version