-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Determine whether to use a margin of 0 or 1 when uncommenting #476
Conversation
This looks mostly good to me. But a couple of things:
|
Fixed in a7dd731. |
`toggle_line_comments` collects the lines covered by all selections into a `Vec`, skipping duplicates. `find_line_comment` now returns the lines to operate on, instead of returning the lines to skip.
The length of `lines` includes blank lines which will be skipped, and as such do not need space for a change reserved for them. `to_change` includes only the lines which will be changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beside the change mentioned looks good to me. Not tested.
Thanks for working on this. :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me besides on the comment that it should have. Not tested for a second time.
I deleted the master branch of my fork accidentally, sorry. |
Fix #474. This change will cause uncommenting to use a margin of
0
when any of the uncommented lines does not have a space after the comment token, rather than unconditionally using a margin of1
. I apologise if I might have overlooked something, I've never actually contributed to an open source project before.