Closed cbarrick closed 10 years ago
The bug is I believe an interaction between
"end": "(?!\\G)",
in "punctuation.whitespace.comment.leading.js".
and the 'punctuation.definition.string.begin.js' rule:
"begin": "(?<=[=(:]|^|return|&&|\\|\\||!)\\s*(/)(?![/*+{}?])"
As editing either of these seems to fix matters.
You can read http://textmate.1073791.n5.nabble.com/The-use-of-G-in-single-line-comments-td25933.html for a discussion of how this rule operates in textmate.
Now, I'm not really sure what these rules are doing to be honest
Ignoring the fact that, as I say, I don't know what I'm doing, if I change the definition of punctuation.definition.string.begin.js begin from the current value to (so just changing the ?![ into ?=/[^), so:
"begin": "(?<=[=(:]|^|return|&&|\\|\\||!)\\s*(/)(?=/[^/*+{}?])"
That seems to fix the problem. I copied that from textmate's current javascript bundle.
This looks to have been fixed by https://github.com/atom/language-javascript/commit/212b6ada88179ad41fcf9e4eba04ef6ce74eff31 so I'm going to close this out here, sorry for the delay, but it should be fixed in the latest Atom release, 0.125
I'm experiencing this on 0.178.0
Toggling comments via editor:toggle-line-comments works fine but adding or removing comments manually hangs atom. Only in js files.
Can you reproduce this in safe mode (atom --safe
)?
No I can not reproduce in --safe. It is the compilation of suggestion list that hangs atom.
Sorry, not exclusive to javascript. Just observed the same bug in ruby.
@baelter Sounds like a possible problem in autocomplete-plus (since you're not able to reproduce the problem in safe mode). Have you reported the issue over there as well? If so, can you add a link here for reference? Thanks.
I'm on Atom 0.92.0 with Language Javascript 0.24.0. The issue doesn't happen with this plugin disabled. No logs in the dev console or Console.app that I can find.
There is a thread on the forums: http://discuss.atom.io/t/bug-adding-comment-to-javascript-file-crashes-atom/6786
Steps to reproduce:
Expected:
A "/" character should be entered on a new line at the top of the document
Actual:
Atom hangs.
Sample source: