p5.js-editor icon indicating copy to clipboard operation
p5.js-editor copied to clipboard

Auto-closing of curly braces is different from parentheses?

Open JobLeonard opened this issue 8 years ago • 0 comments

Bit of a nitpick: but I just noticed this while writing a sketch and it resulted in some stupid bugs. Made a micro-screencapture to clarify:

curly brace

Now, this is mostly normal behaviour: the closing curly brace is not entered until you press enter. However, because it's on the last line, the closing brace is hidden! So I kept adding extra closing braces manually, leading to silly bugs.

Is there a reason for not immediately closing {}, like with [] and ()?

JobLeonard avatar Jul 25 '16 13:07 JobLeonard