Author Topic: v17.0.1: Spurious spaces on syntax expansion (C)  (Read 1198 times)

jc44

  • Senior Community Member
  • Posts: 144
  • Hero Points: 5
v17.0.1: Spurious spaces on syntax expansion (C)
« on: July 20, 2012, 03:02:15 pm »
Syntax expansion seems to have changed in 17.0.1 (since I think 17.0.0.x) such that I now get spurious spaces after "()" in syntax expansion.  Examples below - ">" == tab, "." == space

main()
{
>   do
>   {
>   >   
>   }.while.();.

>   if.().
>{
>   >   
>}

>   while.().
>   {
>   >   
>   }
}

This is in "C/C++".  Any clues as to how to kill this?

Ta

Stu

  • Community Member
  • Posts: 57
  • Hero Points: -1
Re: v17.0.1: Spurious spaces on syntax expansion (C)
« Reply #1 on: July 22, 2012, 05:57:35 pm »
I'm seeing this all over the place too with syntax expansion, does not seem to be an options for controlling spaces on syntax expansion that I can find.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 818
  • Hero Points: 46
Re: v17.0.1: Spurious spaces on syntax expansion (C)
« Reply #2 on: July 23, 2012, 01:26:52 pm »
I've reproduced it in 17.0.1, taking a look at it.  I think if you go to the C/C++ -> General options page, and turn off Beautify Syntax Expansion, you won't get the trailing spaces.

Stu

  • Community Member
  • Posts: 57
  • Hero Points: -1
Re: v17.0.1: Spurious spaces on syntax expansion (C)
« Reply #3 on: July 23, 2012, 03:47:24 pm »
hmm I'll test when I get home from work but that would imply that Beautify Syntax Expansion is not running against my current beautify settings, not a big deal tho.

chrisant

  • Senior Community Member
  • Posts: 1413
  • Hero Points: 131
Re: v17.0.1: Spurious spaces on syntax expansion (C)
« Reply #4 on: July 23, 2012, 03:52:02 pm »
I think patrick means a bug in Beautify Syntax Expansion is introducing the spaces by accident.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 818
  • Hero Points: 46
Re: v17.0.1: Spurious spaces on syntax expansion (C)
« Reply #5 on: July 23, 2012, 04:06:19 pm »
Exactly.  Your "Remove trailing whitespace" setting is most likely enabled, but the bug I introduced in 17.0.1 is inhibiting that setting for the syntax expansion case.  A plain old beautify or beautify-selection should honor the setting.

It's not hot-fixable, but the fix will be in the 17.0.2 point release.