adobe / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
33.26k stars 7.63k forks source link

Commenting collapsed code-blocks comments only first line. #11682

Open maxwowpow opened 9 years ago

maxwowpow commented 9 years ago

Repro:

  1. write a function
function bla() { 
 alert(0);
 }
  1. collapse the code =>>>
function bla() { ... }
  1. set the cursor before the function and put 2 slashes comment:
// function bla() { ... }

Expected: EVERY LINE of the collapsed code block is commented out.

//function bla() { 
// alert(0);
// }

Even if I know, that collapsing code serves merely for increasing readability - I see the closing braket on the same line with the opening braket, so visually it's a single line.

Happens: Only [first] line gets commented. Collapsed code remains collapsed and no VISUAL reinforcement signalizes about any syntactical error.

//function bla() { 
 alert(0);
 }

Proposition: make two slashes in JS files before collapsed sections recognized and propagate to each line of collapsed block. And vice-versa for uncommenting.

SachinPachari commented 8 years ago

Hi @ingorichter Can i try fixing this ?