{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/TouchDevelop/issues/244","repository_url":"https://api.github.com/repos/Microsoft/TouchDevelop","labels_url":"https://api.github.com/repos/Microsoft/TouchDevelop/issues/244/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TouchDevelop/issues/244/comments","events_url":"https://api.github.com/repos/Microsoft/TouchDevelop/issues/244/events","html_url":"https://github.com/Microsoft/TouchDevelop/issues/244","id":94396971,"number":244,"title":"Editor crashes when adding a comment to a function parameter","user":{"login":"jtuchsen","id":8864174,"avatar_url":"https://avatars.githubusercontent.com/u/8864174?v=3","gravatar_id":"","url":"https://api.github.com/users/jtuchsen","html_url":"https://github.com/jtuchsen","followers_url":"https://api.github.com/users/jtuchsen/followers","following_url":"https://api.github.com/users/jtuchsen/following{/other_user}","gists_url":"https://api.github.com/users/jtuchsen/gists{/gist_id}","starred_url":"https://api.github.com/users/jtuchsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtuchsen/subscriptions","organizations_url":"https://api.github.com/users/jtuchsen/orgs","repos_url":"https://api.github.com/users/jtuchsen/repos","events_url":"https://api.github.com/users/jtuchsen/events{/privacy}","received_events_url":"https://api.github.com/users/jtuchsen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TouchDevelop/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/Microsoft/TouchDevelop/labels/P1","name":"P1","color":"006b75"}],"state":"closed","locked":false,"assignee":{"login":"millerv","id":2482509,"avatar_url":"https://avatars.githubusercontent.com/u/2482509?v=3","gravatar_id":"","url":"https://api.github.com/users/millerv","html_url":"https://github.com/millerv","followers_url":"https://api.github.com/users/millerv/followers","following_url":"https://api.github.com/users/millerv/following{/other_user}","gists_url":"https://api.github.com/users/millerv/gists{/gist_id}","starred_url":"https://api.github.com/users/millerv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/millerv/subscriptions","organizations_url":"https://api.github.com/users/millerv/orgs","repos_url":"https://api.github.com/users/millerv/repos","events_url":"https://api.github.com/users/millerv/events{/privacy}","received_events_url":"https://api.github.com/users/millerv/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-07-10T21:25:55Z","updated_at":"2016-02-02T18:41:36Z","closed_at":"2016-02-02T18:41:36Z","body":"It's possible to crash the editor by trying to add a comment (or any other imperative statement) while at the beginning of a function parameter, another way to trigger it is to try and add a statement to a record field. Here's a [gif](https://cloud.githubusercontent.com/assets/8864174/8628690/ec26b6e2-2709-11e5-90a7-fa5db6e58ddc.gif) illustrating how to trigger the bug. I investigated and it looks like the bug surfaced when the calculator was changed to show the upper statements bar on the beginning of any line, which is necessary to allow for the \"return\" statement no doubt.\r\n\r\nI have a patch which filters out function parameters and record fields from showing the top statement bar. It's a bit of a band aid solution, but given the statements bar does nothing in both of those scenarios, it's seems right to just hide it and let the documentation stay presented. If you're planning on allowing comments on editor fields or anything else that requires that top bar to be shown, I can fix the crash more directly if you like."}}