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

[Bug]: Formatting with missing END causes deletion of a space in next function declaration #65

Open
2 of 4 tasks
steinhh opened this issue Jan 15, 2025 · 0 comments
Open
2 of 4 tasks
Labels
type: bug Something isn't working

Comments

@steinhh
Copy link

steinhh commented Jan 15, 2025

Current Behavior

This file is formatted correctly:

FUNCTION test
  FOREACH a, [1, 2, 3] DO BEGIN
    print, a
  END
END

PRO test
  test
END

but when deleting the first END and typing save with format-on-save active, the file becomes:

FUNCTION test
  FOREACH a, [1, 2, 3] DO BEGIN
    print, a
  END

  PROtest
  test
END

The formatting can obviously not become correct with incorrect code, but the space between PRO and test should not have been deleted.

Expected Behavior

Expected behaviour would be to complain about a syntax error, without formatting the file.

GitHub Repo

No response

Steps to Reproduce

See Current Behaviour

Failure Logs

No response

Operating System

  • macOS (Intel x86_64)
  • macOS (ARM64)
  • Linux
  • Windows

IDL Version

N/A

Additional Information

No response

@steinhh steinhh added the type: bug Something isn't working label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant