Author Topic: Beautify Keeps adding spaces ...  (Read 2285 times)

rgloden

  • Senior Community Member
  • Posts: 169
  • Hero Points: 5
Beautify Keeps adding spaces ...
« on: December 11, 2014, 12:01:44 am »
I think this is a issue in both V18 and V19.

In C++ have function which does some inline assembly code that looks like:

uint32 read_register()
{
   __asm("read_register");
   . . .
}

Every time I run Beautify, it add another space after the opening parenthesis.  So after a few Beautifies, there are several spaces after the opening parenthesis, e.g.

   __asm(    "read_register");

I have the Beautify option "Pad inside parenthesis" set to ON ... and it normally works as expected.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1794
  • Hero Points: 151
Re: Beautify Keeps adding spaces ...
« Reply #1 on: December 11, 2014, 02:36:03 pm »
Reproduced.  It seems to be some sort of unexpected interaction between pad parenthesis for function calls, and embedded language sections.  I don't think there's any workaround.

It's an odd case; technically we're not supposed to add or remove space from embedded sections, though you could argue it's allowable in this case because the space is not significant, just the bit in double quotes is.  I'll have to think on it.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1794
  • Hero Points: 151
Re: Beautify Keeps adding spaces ...
« Reply #2 on: December 15, 2014, 06:03:06 pm »
I'm fixing this, but it won't be in the upcoming 19.0.1 update.