#1118 'for' loop folding incorrect

Bug
closed-duplicate
Scintilla (792)
4
2012-10-21
2011-03-24
karatedog
No

These are two nested loops, and folding becomes incorrect, when those 'puts' commands are added in the outer loop.
Folding the inner loop hides all 'puts' as well, but they are not part of the inner loop, they are in the outer 'do' - 'end' block.

for j in 0...SIZE do
printf("%3d", j)
print(": ")
for i in 0...SIZE do
printf("%3d ", array[j][i])
end
puts
puts
puts
end

I didn't test other loop constructs, but Ruby has a metric tons of them, others might be incorrect as well.

Discussion

  • Neil Hodgson

    Neil Hodgson - 2011-03-25
    • assigned_to: nobody --> nyamatongwe
    • priority: 5 --> 4
    • status: open --> open-accepted
     
  • Neil Hodgson

    Neil Hodgson - 2011-03-25

    It is counting both the 'for' and 'do' as adding fold levels. I'll leave this to the Ruby users.

     
  • karatedog

    karatedog - 2011-03-25

    Sry for the noob question, what "I'll leave this to the Ruby users" means?

     
  • Neil Hodgson

    Neil Hodgson - 2011-03-25

    It means I will not be working on this myself.

     
  • Neil Hodgson

    Neil Hodgson - 2012-09-16
    • status: open-accepted --> open-duplicate
     
  • Neil Hodgson

    Neil Hodgson - 2012-10-21
    • status: open-duplicate --> closed-duplicate
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks