MoonByteShaker / block-comment-lines

block-comment the selected lines
MIT License
1 stars 3 forks source link

Undoing block comments #4

Open dk0r opened 8 years ago

dk0r commented 8 years ago

Trying to undo block comments does not work as I would have expected:

Steps to reproduce: 1) Highlight a block of css code:

outline: 1px dotted grey;
display: flex;
justify-content: center;
align-items: center;

2) Press alt+shift+b to comment the block:

/*outline: 1px dotted grey;
display: flex;
justify-content: center;
align-items: center;*/

3) Re-highlight the commented block of code (including comments)

/*outline: 1px dotted grey;
display: flex;
justify-content: center;
align-items: center;*/

4)Press alt+shift+b to UNcomment the block

/*/*outline: 1px dotted grey;
display: flex;
justify-content: center;
align-items: center;*/*/

Notice that step-4 did not actually undo the comment, but simply added an additional comment block.

MoonByteShaker commented 8 years ago

Hi, actually it's not needed to re-highlight the commented block. Your cursor only needs to be inside the commented block. "alt+shift+b" should do the trick then.

What kind of document are you using? .css, .js, .htm? I tried to reproduce it. But it works even if i'm re-highlighting the commented block.