Confusing behavior when adding a closing brace

Consider this situation:

brace1.png

I've got a ctor and I'm adding a lambda inside. When I close that by typing '}' it does not do what I'd expect. I get this instead:

brace2.png

This is very strange. It puts the cursor on the closing brace. I've tried a few times to add the brace and it always ignores my keypress and puts me back at the closing brace.

I can't think of any reason that this could be correct behavior so I'm reporting it as a bug. I found two workarounds: first, I could hit } twice, then manually go and reformat the code to get it to work. Or I could type a closing paren ')' then back up over it and type the } again.

Is this the intended behavior? It's very confusing when this happens.

1 comment
Comment actions Permalink

Hello Scott,

Thank you for reporting! I've filed a bug-report: http://youtrack.jetbrains.net/issue/RSRP-182803.


Andrey Serebryansky
Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Consider this situation:

Image:brace1.png

I've got a ctor and I'm adding a lambda inside. When I close that by
typing '}' it does not do what I'd expect. I get this instead:

Image:brace2.png

This is very strange. It puts the cursor on the closing brace. I've
tried a few times to add the brace and it always ignores my keypress
and puts me back at the closing brace.

I can't think of any reason that this could be correct behavior so I'm
reporting it as a bug. I found two workarounds: first, I could hit }
twice, then manually go and reformat the code to get it to work. Or I
could type a closing paren ')' then back up over it and type the }
again.

Is this the intended behavior? It's very confusing when this happens.

---
Original message URL:
http://www.jetbrains.net/devnet/message/5265670#5265670



0

Please sign in to leave a comment.