Author Topic: Beautify on the fly adds a space on end of line...  (Read 1748 times)

joecar

  • Senior Community Member
  • Posts: 184
  • Hero Points: 7
  • engineer/gearhead
Beautify on the fly adds a space on end of line...
« on: June 17, 2014, 06:18:07 pm »
I have Beautify enabled for Drag/Drop/Paste, Typing, Syntax Expansion, and Alias Expansion...

I have noticed in the last few months that whenever I edit/copy/paste existing code that a space character gets added to the end of line (very frustrating)...

I can't seem to figure out how to disable this space, please help.

Thanks.

joecar

  • Senior Community Member
  • Posts: 184
  • Hero Points: 7
  • engineer/gearhead
Re: Beautify on the fly adds a space on end of line...
« Reply #1 on: June 17, 2014, 06:19:19 pm »
I have the latest patch installed:
18.0.1\hotfixes\hotfix_se1801_29_cumulative.zip (Revision: 29)


joecar

  • Senior Community Member
  • Posts: 184
  • Hero Points: 7
  • engineer/gearhead
Re: Beautify on the fly adds a space on end of line...
« Reply #2 on: June 17, 2014, 07:13:46 pm »
Also, seemingly related, when touching code near a function header, the function's opening brace gets moved to the end of the function header...

i.e. from here:
Code: [Select]
static inline void __list_init(struct list_head *list)
{
list->next = list->prev = list;
}

to here:
Code: [Select]
static inline void __list_init(struct list_head *list) {
list->next = list->prev = list;
}

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 863
  • Hero Points: 55
Re: Beautify on the fly adds a space on end of line...
« Reply #3 on: June 17, 2014, 09:17:25 pm »
I can reproduce the space at the end of the line only when my cursor is at the end of the line when I do the paste. If I'm pasting a line selection, and my cursor is in the middle of the line, I don't see it.  This match up with what you're seeing?  I think I know why this is happening, I'll take a look and see if I can fix it for v19.  I don't think it's hot-fixable.

For the brace issue:  is the problem that the function declaration brace style is not actually set to "Same Line" in the configuration, and it should be leaving it in the "Next Line" position?  Or is it that the edits you're doing shouldn't be beautifying as far up as the left brace?

joecar

  • Senior Community Member
  • Posts: 184
  • Hero Points: 7
  • engineer/gearhead
Re: Beautify on the fly adds a space on end of line...
« Reply #4 on: June 17, 2014, 09:23:57 pm »
I can reproduce the space at the end of the line only when my cursor is at the end of the line when I do the paste. If I'm pasting a line selection, and my cursor is in the middle of the line, I don't see it.  This match up with what you're seeing?  I think I know why this is happening, I'll take a look and see if I can fix it for v19.  I don't think it's hot-fixable.
Close and/or similar.

Quote
For the brace issue:  is the problem that the function declaration brace style is not actually set to "Same Line" in the configuration, and it should be leaving it in the "Next Line" position?  Or is it that the edits you're doing shouldn't be beautifying as far up as the left brace?
I have Functions set to Next Line.

joecar

  • Senior Community Member
  • Posts: 184
  • Hero Points: 7
  • engineer/gearhead
Re: Beautify on the fly adds a space on end of line...
« Reply #5 on: June 17, 2014, 09:24:19 pm »
Thanks.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 863
  • Hero Points: 55
Re: Beautify on the fly adds a space on end of line...
« Reply #6 on: June 17, 2014, 09:28:52 pm »
Ok, the brace thing is probably hot-fixable, it sounds more like a problem with how much leading context we feed the beautifier when beautifying only snippets of code.  I'll look into it more deeply tomorrow morning, and see what I can do with it.

Thanks for the reports.