Go Down

Topic: IDE bug with braces //{, "{", '{' that aren't part of the code (Read 407 times) previous topic - next topic

Tuppe

Put this to IDE, move the text cursor to each brace and see that it guides you wrong.
Code: [Select]
if (character=="{") //{
{
dostuff;
}
}
}


I bet there's way easy IDE fix for this problem.
I couldn't find any topic about this, sorry if it's a repost.

ralphd

I just confirmed it with version 1.04 of the IDE.  I'm surprised nobody noticed this before.
Unthinking respect for authority is the greatest enemy of truth - Einstein.

robtillaart

#2
Jan 19, 2014, 10:04 am Last Edit: Jan 19, 2014, 01:04 pm by robtillaart Reason: 1
checked  - CTRL-T auto formatter does its job right.  (it says too much right } )

It is the match function that fails,
never noticed as I try to do my indenting consequently with { } on separate lines.
Than you can see which pair matches

Code: [Select]

if (condition1)
{
 while (condition2)
 {
   if (character=="{")  //{
   {
     dostuff;
   }
 }
}
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up