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

Include padding for linewise comments on empty lines #494

Open
brdoney opened this issue Nov 19, 2024 · 0 comments · May be fixed by #495
Open

Include padding for linewise comments on empty lines #494

brdoney opened this issue Nov 19, 2024 · 0 comments · May be fixed by #495

Comments

@brdoney
Copy link

brdoney commented Nov 19, 2024

I noticed that toggling a linewise comment (e.g. require("Comment.api").toggle.linewise.current()) on an empty line does not add padding. Interestingly, when a line is just whitespace, it does add padding.

So is leaving padding out of empty lines intentional? Personally, I think padding should be added universally.

I have been writing a function to toggle comments while in insert mode and the lack of whitespace unfortunately causes an issue while on empty lines. Specifically, if I want to start a comment on an empty line, I have to toggle the comment then manually add padding before I start writing my comment, since the plugin doesn't add it (which is obviously not desirable).

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

Successfully merging a pull request may close this issue.

1 participant