Author Topic: Smart indent indents twice after opening curly brace of if statement  (Read 8319 times)

Offline UberNewb

  • Multiple posting newcomer
  • *
  • Posts: 35
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) {
   |

Current behaviour (pressing enter after the opening curly brace indents two levels) :
Code
if (1) {
      |

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

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13234
    • Travis build status
Re: Smart indent indents twice after opening curly brace of if statement
« Reply #1 on: July 01, 2013, 08:51:56 am »
Bug.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline UberNewb

  • Multiple posting newcomer
  • *
  • Posts: 35
Re: Smart indent indents twice after opening curly brace of if statement
« Reply #2 on: July 01, 2013, 06:15:20 pm »
I can confirm the behaviour is still there in the latest nightly, 9158 from June 16, 2013

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Smart indent indents twice after opening curly brace of if statement
« Reply #3 on: July 01, 2013, 09:39:27 pm »
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.

Offline UberNewb

  • Multiple posting newcomer
  • *
  • Posts: 35
Re: Smart indent indents twice after opening curly brace of if statement
« Reply #4 on: July 02, 2013, 07:36:29 am »
Yes, oddly enough backspacing back to the curly brace and pressing enter again only indents one level...