Menu

#3584 Folding mode Indent fails when whole file indented

normal bug
closed-fixed
None
5
2011-09-25
2011-09-21
No

When the whole file is indented, i.e. when there is white-space first on every line of the file, the "Indent" folding mode will create bad foldings.

To reproduce:
1. Create a new "text" file with folding mode "Indent".
2. Enter the following lines in the buffer (first and third line are left-adjusted while second and fourth line are indented):
aaaa
bbbb
cccc
dddd
3. Select Folding > Collapse All Folds. This works fine and you will see the following (where both lines are foldings that can be expanded):
aaaa
cccc
4. Now expand the folds, and indent all lines one more level (e.g. with C+a, tab). The file will then look like this:
aaaa
bbbb
cccc
dddd
5. Select Folding > Collapse All Folds. This is where it bugs out. You will now see only one line:
aaaa
6. Expand the folding and you will see:
aaaa
bbbb

Lines three and four have disappeared. The only way to get them back is with Folding > Expand All Folds (or similar).

jEdit 4.4.1 with Java 1.6.0-23 on Solaris 10. Also with jEdit 4.4.1 with Java 1.6.0-26 on Windows 7. Have not tested other versions.

Discussion

  • Bosse Iseborn

    Bosse Iseborn - 2011-09-21

    Ok, so the indentations in my example obviously did not make it into the textual description here. What should I have done to get it right? "nbsp"? I'll try it below:

    aaaa
      bbbb
    cccc
      

     
  • Bosse Iseborn

    Bosse Iseborn - 2011-09-21

    I give up and just hope that you get it from the descriptions...

     
  • Jarek Czekalski

    Jarek Czekalski - 2011-09-22

    On mailing list it displays properly.
    I noticed people use dots, they are good spaces :)

    [i]
    To reproduce:
    1. Create a new "text" file with folding mode "Indent".
    2. Enter the following lines in the buffer (first and third line are left-adjusted while second and fourth line are indented):
    aaaa
    ..bbbb
    cccc
    ..dddd
    3. Select Folding > Collapse All Folds. This works fine and you will see the following (where both lines are foldings that can be expanded):
    aaaa
    cccc
    4. Now expand the folds, and indent all lines one more level (e.g. with C+a, tab). The file will then look like this:
    ..aaaa
    ....bbbb
    ..cccc
    ....dddd
    5. Select Folding > Collapse All Folds. This is where it bugs out. You will now see only one line:
    ..aaaa
    6. Expand the folding and you will see:
    ..aaaa
    ....bbbb

    Lines three and four have disappeared. The only way to get them back is with Folding > Expand All Folds (or similar).
    [/i]

     
  • Evan Wright

    Evan Wright - 2011-09-24
    • assigned_to: nobody --> evanpw
     
  • Evan Wright

    Evan Wright - 2011-09-25

    Fixed in r20019

     
  • Evan Wright

    Evan Wright - 2011-09-25
    • status: open --> closed-fixed
     

Log in to post a comment.