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

Behaviour of ToggleCommentAction #570

Open
sesquialtera87 opened this issue Sep 23, 2024 · 0 comments
Open

Behaviour of ToggleCommentAction #570

sesquialtera87 opened this issue Sep 23, 2024 · 0 comments
Assignees
Labels
Milestone

Comments

@sesquialtera87
Copy link

sesquialtera87 commented Sep 23, 2024

Description
ToggleCommentAction seems to act only at line start.
For example, if RSyntaxTextArea contains the following Java code I try to de-comment the second line:

private void add(int a, int b) {
    // return 2*a + b
    return a + b;
}

I get this, where another double-slash line comment is inserted, instead of beeing removed.

private void add(int a, int b) {
//    // return 2*a + b
    return a + b;
}

Expected behavior
It would seem appropriate for ToggleCommentAction to identify a comment regardless of the leading whitespaces preceding the comment marker.

Java version
OpenJDK 18.0.2

@bobbylight bobbylight self-assigned this Sep 28, 2024
@bobbylight bobbylight added this to the 3.5.2 milestone Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants