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

vfmt's recent automatic const scope unwrapping ruins valuable trailing comments in vlang/sdl #20000

Closed
larpon opened this issue Nov 26, 2023 · 1 comment · Fixed by #20005
Closed
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@larpon
Copy link
Contributor

larpon commented Nov 26, 2023

Describe the bug

vfmt's recent automatic const scope unwrapping ruins valuable trailing comments in vlang/sdl:
image

Reproduction Steps

Run v fmt -w ~/.vmodules/sdl/audio.c.v and see how comments are moved to new lines below the statements and as an extra bonus it will also eat the last trailing comment 😄

Expected Behavior

image

Current Behavior

image

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.4.3 b088f43

Environment details (OS name and version, etc.)

Arch-based EndeavourOS

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@spytheman
Copy link
Member

spytheman commented Nov 27, 2023

With latest V, it seems to work fine better now:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants