Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailing whitespaces are getting added where they're not #189

Open
stephen147 opened this issue Jul 10, 2022 · 5 comments
Open

Trailing whitespaces are getting added where they're not #189

stephen147 opened this issue Jul 10, 2022 · 5 comments

Comments

@stephen147
Copy link

Describe the bug
Trailing whitespaces are getting added when there were none.

To Reproduce
Paste this code to the editor, there's whitespaces getting added after (errmsg) and errmsg .

  (defun *error* (errmsg) 
    (and acDoc (vla-EndUndoMark acDoc))
    (and errmsg 
         (not (wcmatch (strcase errmsg) "*CANCEL*,*EXIT*"))
         (princ (strcat "\n<< Error: " errmsg " >>\n"))
    )
  )

Expected behaviour
It shouldn't be adding in trailing whitespaces when there were none.

Desktop (please complete the following information):

  • OS: Microsoft Windows 10 Pro

Additional context
I have trim trailing whitespace set in VSCodes settings but this doesn't have any effect on this.

@Sen-real
Copy link
Collaborator

Sen-real commented Jul 11, 2022

Hi @stephen147 ,
I can't reproduce this problem.
This is the result after I pasted the code into VS Code:
image

I then right-clicked in the editor, and clicked 'Format Document', and the result seems good too:
image

I then tried to add a whitespace - changing (errmsg) to (errmsg ), and then ran 'Format Document', and that whitespace I added was removed.

I'm working with AutoLispExt v1.5.0. And I guess there's sth. else altering the text...
image

@stephen147
Copy link
Author

Thanks for looking into this. My vscode install is fairly fresh. I'll unzip and new install and install this extension and see if the problem occurs.

@stephen147
Copy link
Author

I've disabled all extensions except AutoLispExt and updated to pre release version v1.5.1.

Still the same issue.

Anything else I could try as well as disabling the extensions.

@vanowm
Copy link

vanowm commented May 9, 2024

I can confirm this, after formatting the text, each command/function that is split into multiple lines is geting a trailing space:

Before format:
image

After formatting:
image

@vanowm
Copy link

vanowm commented Aug 28, 2024

The trailing spaces are added during formatting (SHIFT + ALT + F)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants