Author Topic: Beautify alias expansions option backwards on Mac 20.0.3  (Read 1582 times)

tim_k

  • Senior Community Member
  • Posts: 141
  • Hero Points: 11
  • -Tim
Beautify alias expansions option backwards on Mac 20.0.3
« on: June 03, 2016, 09:48:12 pm »
In the SystemVerilog general options, the "Beautify alias expansions" option behaves opposite the checkmark - check it and it does not beautify the expanded alias, uncheck it and the expanded alias is beautified.

See the screen captures for the settings and the resulting code. I haven't tested thoroughly, but the rest of the setting seem to work. I don't know if it's SystemVerilog only, or other languages as well.

-Tim

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1033
  • Hero Points: 88
Re: Beautify alias expansions option backwards on Mac 20.0.3
« Reply #1 on: June 06, 2016, 02:03:50 pm »
Interesting.  Actually, the checkbox works correctly, something is going wrong when it formats the alias expansion, so it ends up flattening the indents.  I'm looking into it now.

tim_k

  • Senior Community Member
  • Posts: 141
  • Hero Points: 11
  • -Tim
Re: Beautify alias expansions option backwards on Mac 20.0.3
« Reply #2 on: June 06, 2016, 03:27:34 pm »
While you're at it...

If the "Beautify on paste or drag and drop" is selected, there's bad behavior on paste as well.

Before paste:

Code: [Select]
always_ff @(posedge clk, negedge reset_n)
begin
  if (!reset_n)
    begin
      signal <= signal1;
    end
  else
    begin
     
    end
end

After paste:

Code: [Select]
always_ff @(posedge clk, negedge reset_n)
begin
  if (!reset_n)
    begin
signal <= signal1 && signal2;
    end
  else
    begin
     
    end
end

Similar badness happens on my linux box (RHEL 6.8) but instead of outdenting to the beginning of the line, it adds an indent.

On both machines if I paste then undo, I get the original indent level and the pasted text is preserved.

-Tim

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1033
  • Hero Points: 88
Re: Beautify alias expansions option backwards on Mac 20.0.3
« Reply #3 on: June 06, 2016, 03:52:17 pm »
I haven't gotten far enough to be sure, but I suspect that's the same thing.  Both those features use the same API to beautify a snippet of code from the buffer.

tim_k

  • Senior Community Member
  • Posts: 141
  • Hero Points: 11
  • -Tim
Re: Beautify alias expansions option backwards on Mac 20.0.3
« Reply #4 on: June 07, 2016, 06:58:31 pm »
Probably in the same bucket, but auto completion does the same thing.

-Tim

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1033
  • Hero Points: 88
Re: Beautify alias expansions option backwards on Mac 20.0.3
« Reply #5 on: August 02, 2016, 05:52:11 pm »
There's fixes for these problems in the upcoming v21 beta 3.

tim_k

  • Senior Community Member
  • Posts: 141
  • Hero Points: 11
  • -Tim
Re: Beautify alias expansions option backwards on Mac 20.0.3
« Reply #6 on: August 02, 2016, 06:38:11 pm »
Cool, I'll keep an eye out for it.

-Tim