Author Topic: bug in code folding?  (Read 3801 times)

JacK-DuRdEn_

  • Guest
bug in code folding?
« on: January 01, 2006, 02:29:52 am »
i don't know if it's already solved but I searched and found nothing.
i was just trying some tutorial on c++ and when i fold code to move it,
everything inside the code got replaced by whatever was below the line where
i moved it. here's a gif of what i did and what happened. (attached)



[attachment deleted by admin]

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: bug in code folding?
« Reply #1 on: January 01, 2006, 07:24:15 pm »
Just tried, unable to reproduce that behaviour, sorry. Everything works just fine here.



Version 1.0 revision 1605 (gcc 3.4.4 Windows/ANSI, build: Dec 27 2005 21:12:25)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

JacK-DuRdEn_

  • Guest
Re: bug in code folding?
« Reply #2 on: January 01, 2006, 11:06:51 pm »
Im sorry to bother, maybe im just doing something wrong, but i keep getting that error. I'm using the Code::Blocks 1.0 rc2.

In this example (attached) if i triple-click select the "for" line (line 9) when that block is folded
and move it to another line (i moved it to line number 3), then everything inside the "for" stayed
right where it was and the only thing that moved was line 9 (the "for" line).

Then, if i fold the "for" line again everything gets messed up and trying to undoing it makes it only worse. :(
Also the problem doesnt happen if i select from the first character of line 10 to the beginning of line 9. So it makes think that maybe the problem is in how the program handles the brackets and the folding.

Thanks for reading and trying, if there is something i'm doing wrong please correct me.  :)
Bye.



[attachment deleted by admin]
« Last Edit: January 01, 2006, 11:08:29 pm by JacK-DuRdEn_ »

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: bug in code folding?
« Reply #3 on: January 01, 2006, 11:37:44 pm »
Ah... a good description is worth a fortune. Now I actually understood what exactly you did.

Yes, indeed, I can reproduce that, and I think it is very much how it should be.
Triple-clicking selects one line (whether folded or not) and thus, moving that selection moves exactly one line.
You expected it to select the complete folded block, right?
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

JacK-DuRdEn_

  • Guest
Re: bug in code folding?
« Reply #4 on: January 02, 2006, 12:43:55 am »
ahahah indeed i expected that. but it makes more sense what you said, when i unfolded the selected code it showed that behaviour, now it seems pretty obvious  :P

Thanks a lot for your help thomas.  :D