0

I'm not able to enter the closing curly bracket of a JSON object in a javascript Cloud9/ACE editor. The editor collapses the entire code until the end of the function.

Example: var y = {firstname: 'John', lastname: 'Miller'}

If I copy this line from another source and paste inside the javascript code all works fine.

Is it a bug or a handling error? Any idea?

Rolf
  • 191
  • 1
  • 4
  • 13
  • Could you give a bit more detail. Which mode do you use, how editor 'collapses' it? What keyboard do yo use? on some keyboards to enter `}` you need to use combination of keys, which can be mapped to something else. – a user Oct 30 '14 at 20:40
  • I can reproduce this behaviour everywhere the ace editor is used. Including a local installation. I use a german keyboard and enter } in combination with the _Alt Gr_ key. There is no problem with {. If I create a function the closing } will automatically inserted after I input the opening {. In my example (look at my question) the closing } won't be added automatically. – Rolf Oct 31 '14 at 14:14
  • So the issue is that } isn't inserted automatically, not that typing it deletes some text right? Autoinserting closing } at the end of line was disabled some time ago see https://github.com/ajaxorg/ace/commit/99e45e012770510fdc71cac68c2f81d6f9417539. Yo can comment there if you want to restore that behavior. – a user Oct 31 '14 at 18:45
  • I didn't know that I've to insert a newline. Then it works fine. – Rolf Nov 01 '14 at 14:09

0 Answers0