Author Topic: (B3) Bad indentation with mismatched paren  (Read 964 times)

Tim Kemp

  • Senior Community Member
  • Posts: 535
  • Hero Points: 90
(B3) Bad indentation with mismatched paren
« on: August 26, 2016, 02:44:31 pm »
I typed in something like:

Code: [Select]
    unsigned short x2 = value - (i * POWER_TABLE_X_STEP)>>16);
I was at the end of the line and pressed return. The cursor went to the next line, but indented to just before the semicolon. That doesn't seem right.

SlickEdit Pro 2016 (v21.0.0.4 32-bit)
OS: Windows 7 x64
Build Date: August 12, 2016
Emulation: CUA
Mode: C/C++

b

  • Senior Community Member
  • Posts: 284
  • Hero Points: 25
Re: (B3) Bad indentation with mismatched paren
« Reply #1 on: August 26, 2016, 04:01:42 pm »
I do see an extra closing paren in your statement, but I wouldn't expect it to indent, though.

Tim Kemp

  • Senior Community Member
  • Posts: 535
  • Hero Points: 90
Re: (B3) Bad indentation with mismatched paren
« Reply #2 on: August 26, 2016, 04:18:59 pm »
I assume it's just another manifestation of the same thing, but if you go to the line after the example and hit tab it jumps to the horizontal position before the semi-colon too.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4794
  • Hero Points: 388
Re: (B3) Bad indentation with mismatched paren
« Reply #3 on: August 26, 2016, 04:21:46 pm »
It's a limitation. Look easy...nope

Tim Kemp

  • Senior Community Member
  • Posts: 535
  • Hero Points: 90
Re: (B3) Bad indentation with mismatched paren
« Reply #4 on: August 26, 2016, 05:10:46 pm »
No problem. After all I wrote broken code.  ;D

I just thought I'd point it out since having the cursor end up in an unexpected spot is sort of jarring. I tend to write code (and for that matter English) in a non-linear way and I often have busted stuff lying around for a while as I'm finishing a thought. Random unexpected cursor movement is better than IDEs that pop-up error notifications in the middle of typing.