[BUG] v1.9 Each key press of the Enter key automatically inserts a comment line '--'

M.Y Developers,

This happens from time to time.  A restart some times fixes the problem but it will creep back after some use.  Looks like the formatter thinks every new line is a comment for some reason.  Can’t pin point why this is happening so I can’t supply a sample.

Also, I tried submitting a bug @ mydevelopers.atlassian.net but can’t submit. 

Please advise.

Nathan.

Ok just figured out why this is happening.

Take for example this block of comments:


– Disconnect the established connect.

@returns {io.Socket}

@api public

^^  Causes bug

The trailing double dash causes the formatter to think that any line below that is a comment.  If I remove the dashes it works fine.

Hope this helps.

Nathan.

Hello Nathan,

The idea here was to allow you to enter multi line luadoc comments easily. The behavior should be fixed in the update but this is how we intended it to work:

  1. if the first comment in the series starts with 3 dashes, consider it a lua doc

  2. if the line before the caret is at least 4 characters long (no whitespace) consider that the user wants to add extra lines to the comment.

  3. otherwise don’t add an extra comment and just break as you usually would.

The behaviour seems to be flipped at number (2) but we have fixed it in an update.

Regards,

M.Y. Developers

Ok just figured out why this is happening.

Take for example this block of comments:


– Disconnect the established connect.

@returns {io.Socket}

@api public

^^  Causes bug

The trailing double dash causes the formatter to think that any line below that is a comment.  If I remove the dashes it works fine.

Hope this helps.

Nathan.

Hello Nathan,

The idea here was to allow you to enter multi line luadoc comments easily. The behavior should be fixed in the update but this is how we intended it to work:

  1. if the first comment in the series starts with 3 dashes, consider it a lua doc

  2. if the line before the caret is at least 4 characters long (no whitespace) consider that the user wants to add extra lines to the comment.

  3. otherwise don’t add an extra comment and just break as you usually would.

The behaviour seems to be flipped at number (2) but we have fixed it in an update.

Regards,

M.Y. Developers