DescriptionToggleCommentAction 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.
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:I get this, where another double-slash line comment is inserted, instead of beeing removed.
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