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

Improve toggle comment function in script editor #22738

Merged
merged 1 commit into from
Oct 16, 2018

Conversation

akerudesu
Copy link
Contributor

Improved the toggle comment feature to automatically adjust the selection area & cursor position when toggling comments on a section of code.

Should close #22214.

@akien-mga
Copy link
Member

CC @Paulb23

Copy link
Member

@Paulb23 Paulb23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, nice improvement!

One minor issue, If you have the entire from_line selected, it doesn't adjust the selection over the comment delimiter.

@akerudesu
Copy link
Contributor Author

I tweaked the behaviour slightly to include the delimiter on the first line in the selection, if the selection starts from column 0. Also updated cursor accordingly. Let me know if anything else should be changed.

Copy link
Member

@Paulb23 Paulb23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Good.

@akien-mga akien-mga merged commit 49aa1be into godotengine:master Oct 16, 2018
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

Commenting with CTRL+K leaves out of the selection the last character of the last line
3 participants