-
Notifications
You must be signed in to change notification settings - Fork 17.4k
/* */ comment on a single line inside braces keeps trying to un-indent #4009
Comments
Can you reproduce this issue in another C-like language syntax? Like Java or C? |
Nope, doesn't look like it. It does appear to be JS-specific |
I've successfully reproduced this by doing exactly what @jbt is doing in the provided GIF. Trying to debug. |
Reproduced this with C as well; void main() {
if (TRUE) { /* I cause issues... */}
} As soon as the comment is closed, the line loses one level of indentation. Wondering if this is an issue with bracket-matcher? If I insert a newline after |
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks! |
If I have a
/* comment */
on a single line, Atom automatically un-indents the line immediately when I type the closing*/
and after various edits elsewhere on the line.(the re-indentation in that gif is me hitting
ctrl+]
to fix it)It only seems to occur if the comment is inside some manner of braces or parentheses, for example:
/* foo */
(comment only thing on the line) perfectly finefoo /* bar */
also fineif( /* foo */
is fine but as soon as I type the closing)
it outdents (and then again for subsequent additions to the line), or if the)
was already there thanks to auto-insertion of closing bracketsI think this may be specific to JavaScript syntax, so apologies if the issue should be on language-javascript instead.
Happens in atom built straight off master, but has been happening for a while now, definitely at least since 0.120 or so. Also happens with
--safe
so it isn't a package issue.The text was updated successfully, but these errors were encountered: