Description
Ctrl-Shift-/
(toggle block comment) often toggles the "wrong" block comment when block comments are nested. E.g. when the situation is:
[
/* asd /* sdf */ dfg */
]
where [
and ]
stand for beginning and end of selection.
When I press Ctrl-Shift-/
in this situation, it will toggle the inner block comment, resulting in
/* asd sdf dfg */
but why?
IMO it should always toggle the outermost block comment that the selection includes, if the selection starts and ends outside of any block comment.
But in other situations, it also behaves "wrongly":
/* asd [ sdf ] dfg */
When I press Ctrl-Shift-/
in this situation, it will toggle the outer block comment, resulting in
asd sdf dfg
But it should be clear that I want to toggle the inner comment to get
/* asd /* sdf */ dfg */
because I have selected text within a block comment!
If I just place the cursor inside a block comment, and press Ctrl-Shift-/
, only then should it toggle the next outer block comment!
Of course the definition of "wrong" is my subjective opinion here, but what do you think?
(For me it's very annoying because I often have to deal with nested block comments.)
The way I described it above would be much more intuitive / do what one usually wants, IMO.