@Sandra:What do you think about supporting un-commenting selected lines as follows:
// comment line 1
// comment line 3
Note the blank line 2.
Seems that this change does the trick:
box.e - comment_erase() [line 1484]: v12.03
if (!strieq(cmtLeft, expand_tabs(line, lcPos, size_left_comment, 'S'))) {
status = 1;
break;
}
now:
if (!strieq(cmtLeft, expand_tabs(line, lcPos, size_left_comment, 'S'))) {
// HS2-CHG: added blank line check
nonblank_col = pos('[~ \t]', expand_tabs(line), 1, p_rawpos'er');
if (nonblank_col) {
status = 1;
break;
}
}
This was quite easy to find for line comments but the same 'problem' applies to box comments too.
It's possible to
box this text:
text line 1
text line 2
which e.g. gives:
/*
* text line 1
*
* text line 2
*/
But
box-erase fails on it's own created comment block with 'Bad comment'.
(I quickly recognized that this would take longer than 3 minutes to find/fix for me so I stopped diggin into it

)
However, I think this should be fixed.
In my latest 'toggle_comment' version blanklines are always omitted when doing the 'commenting' check even for seleced lines.
This revealed the issue with uncommenting non-contiguous (commented) lines as described above.
HS2